Writing to a PDB Record
-
I can use the following routine to get the user_id of the logged in user.
$current_user=wp_get_current_user();
$wp_username=$current_user->user_login;
$user_id=Participants_Db::get_record_id_by_term(‘username’,$wp_username);I can use the following rotines to fill an array with data
$data=array(‘name’ => ‘Steve Reynolds’);
$data=array(‘age’ => ’36’);
$data=array(‘town’ => ‘Swindon’);I can use the following statement to write this data back to the Participants DB
Participants_Db::write_participant($data);
but how do I ensure it goes back to the correct record which is given by $user_id
Where do I slot in the $user_id into the command
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Writing to a PDB Record’ is closed to new replies.