but I'm not seeing the syntax error.
help anybody?
$result=mysql_query("UPDATE Stores SET Store='$store', Email='$email', Address='$address', Phone='$phone', Manager='$manager' WHERE id='$store_id'") or die(mysql_error());
MySQL Error: 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 '1' at line 1
1
Is one the value of '$store_id'? If so, try this: $result=mysql_query("UPDATE Stores SET Store='$store', Email='$email', Address='$address', Phone='$phone', Manager='$manager' WHERE id=$store_id") or die(mysql_error());
MySQL Error: 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 '1' at line 1
1
Since I don't see you using mysql_real_escape_string() anywhere, my best guess without seeing the results of that error output is some unescaped special character in one of the variables being used in the query. In any case, I'd strongly recommend moving up to the MySQLi extension or even the PDO extension and make use of prepared statements and bound parameters, and let PHP handle any escaping that's needed itself.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks