GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Hardcore coding help needed (https://gfy.com/showthread.php?t=701795)

who 02-01-2007 08:53 AM

Hardcore coding help needed
 
hi I just need someone to help me with one line of code in wordpress backend.

I have a new field in the 'wp_user' table of the wordpress database,

All I need to do is write some one line of code which will update that field with a value from $_POST

I am struggling now with this crap for a couple of hours... I feel like a retard and most likely am. But can anyone help me out?

Thanks.

who 02-01-2007 08:59 AM

I should've said '

who 02-01-2007 08:59 AM

I should've said 'simple help required'... I bet there's 50 people in here who could do this for me in 20 seconds...

xenilk 02-01-2007 09:27 AM

$value = $_POST['value'];
$query = sprintf("UPDATE wp_user SET field1 = 'whatever goes here' WHERE field2 = '%s'",
mysql_real_escape_string($value));
mysql_query($query);

Query could be changed/adapted to your needs.

who 02-01-2007 09:45 AM

^ 10 points that man!!

Thank you you have solved my problem, I owe you!!

xenilk 02-01-2007 10:33 AM

No problem, glad I could help :)


All times are GMT -7. The time now is 02:25 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123