syco Posted May 20, 2010 Share Posted May 20, 2010 <?php$imageurl = $_REQUEST['imageurl'];$email = $_REQUEST['email'];$age = $_REQUEST['age'];$show = $_REQUEST['show'];$showa = $_REQUEST['showa'];if ($age && $email) {$query = mysql_query("UPDATE znetworking_members SET email = '$email', show = '$show', imageurl = '$imageurl', age = '$age', showa = '$showa' WHERE id = '$msqlid'");echo mysql_error();}?> No matter what it will always say that show or showa are bad... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show = '1', imageurl = 'http://i210.photobucket.com/album' at line 1 If someone can please help that would be nice Link to comment Share on other sites More sharing options...
Ingolme Posted May 20, 2010 Share Posted May 20, 2010 It's possibly because you're putting quotes around values that are supposed to be numeric. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 20, 2010 Share Posted May 20, 2010 "show" is a reserved word in SQL, you need to either change the column name, or use backquotes when you refer to it: $query = mysql_query("UPDATE znetworking_members SET email = '$email', `show` = '$show', imageurl = '$imageurl', age = '$age', showa = '$showa' WHERE id = '$msqlid'"); Link to comment Share on other sites More sharing options...
syco Posted May 21, 2010 Author Share Posted May 21, 2010 Thanks justsomeguy it worked, i just decided to rename it Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.