$wpdb query insert into doesn't work
-
I need to store a journal for users in a custom field in wp database. Doing it with $wpdb and a form I created. Can someone take a look at my code and tell me what I am doing wrong?
$journal = $_POST['textarea']; global $current_user; get_currentuserinfo(); $firstname = $current_user->user_firstname; $lastname = $current_user->user_lastname; $id = $current_user->user_id; global $wpdb; $insert = "INSERT INTO $wpdb->users" . "(journal)" . "VALUES ('".$journal."') where id = $id"; $wpdb->query( $insert );
Should I not be trying to do this in the actual post. I need to email the contents to another custom field as well as make the form transparent and couldn’t see how to do it with form plugins.
Please help!
To answer your question yes I am a newbie.
- The topic ‘$wpdb query insert into doesn't work’ is closed to new replies.