PDA

View Full Version : Whats wrong with this bit of sql php code.


DrkFusion
10-26-2002, 08:44 PM
$DB_site->query("UPDATE user SET myfavt='$tht' WHERE userid=$bbuserinfo[userid]");

?
It doesn't seem to insert the value of $tht to the myfavt column in the user table.

:( I don't get whats wrong

Thanks in Advance

-Arunan

Xenon
10-27-2002, 09:04 AM
are you sure $tht is set up right?

also if it's a value a user can enter you should use this:
$DB_site->query("UPDATE user SET myfavt='".addslashes($tht)."' WHERE userid=$bbuserinfo[userid]");

DrkFusion
10-27-2002, 12:15 PM
Yea, its being passed, I even set up a form for it...I will try the addslashes one.

Thanks
-Arunan

DrkFusion
10-27-2002, 04:05 PM
Thanks Xenon, worked like a charm :)

-Arunan

Xenon
10-27-2002, 04:20 PM
:)
you're welcome :)