View Single Post
Old 02-01-2007, 10:02 AM  
Pryda
Confirmed User
 
Industry Role:
Join Date: Dec 2005
Posts: 904
mysql_query("UPDATE [yourtablename] SET wp_user = '".mysql_real_escape_string(trim($_POST['username']))."'");

That will do the trick. It will fill every wp_user in the table with your POST value. If that is not what you want, you will have to specify a condition using WHERE.

For example:
mysql_query("UPDATE [yourtablename] SET wp_user = '".mysql_real_escape_string(trim($_POST['username']))."' WHERE wp_id = 1");

The function mysql_real_escape_string and trim are not necessary, but they add some extra flexibility and security.
__________________
Babepedia
Pryda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote