Jump to content

Mysql syntax error:


rofl90

Recommended Posts

Heres my 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 'SET name='Charlie Kirk', title='Senior Designer', about='Hi there, my name is Ch' at line 1

 

and the coding;

 

$name = addslashes($_POST['name']);
$title = addslashes($_POST['title']);
$about = addslashes($_POST['about']);
$phone = addslashes($_POST['phone']);
$email = addslashes($_POST['email']);
$skype = addslashes($_POST['skype']);
$world = addslashes($_POST['world']);
$house = addslashes($_POST['house']);

$query = "UPDATE $myuser SET name='$name', title='$title', about='$about', phone='$phone', email='$email', skype='$skype', world='$world', house='$house'";
mysql_query($query) or die(mysql_error());

echo "Updated";
echo $myuser;
echo "'s profile!";

Link to comment
https://forums.phpfreaks.com/topic/95730-mysql-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.