[Resolved] database update to bp_xprofile_data
-
I am trying to make a textarea form that will update user’s “bio” with out having to go to the profile tab.
After looking in the mysql database and checking the structure of the table I noticed this..
user_id = the profile id of the user..
field_id = 5..
(5 being the Bio form..)
value = the string..Here is my code.
echo '<form action="" method="post"> <textarea rows="5" cols="26" name="bio_edit_form">'; bp_member_profile_data( "field=Bio" ); echo '</textarea> <input type="submit" name="submit" value="save"></form>'; if(isset( $_POST["bio_edit_form"]) && strlen ( $_POST["bio_edit_form"] )){ $wpdb->update( 'wp_bp_xprofile_data', array( 'value' => 'rawr', ), array( 'user_id' => '1', 'field_id' => '5', ), array( '%d', '%d', ), array( '%s', ) ); }
Yes, I already globalized $wpdb AND $bp… I’ve checked this code with other working $wpdb->update codes that i’ve created and that works correctly.
Can someone please tell me what I’m doing wrong here or why it’s not updating?
Thanks in advance!
- The topic ‘[Resolved] database update to bp_xprofile_data’ is closed to new replies.