I have recurring issues with incorporating SQL syntax with PHP.
This is what I have, followed by the error I'm getting.
I'm not sure what the problem is, can someone supply some help?
This is what I have, followed by the error I'm getting.
Code:
elseif ($_GET[action] == 'edit' & $_POST[username] != '') {
$query="UPDATE users SET username='$_POST[username]', PASSWORD='$_POST[PASSWORD]', handle='$_POST[handle]', rank='$_POST[rank]', group='$_POST[group]', gender='$_POST[gender]', av='$_POST[av]' WHERE username='$_POST[username]'";
mysql_query($query)or die(mysql_error());
echo "Account successfully updated. Click [<a href='editor.php'>here</a>] to go back.";
}
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 'group='admin3', gender='m', av=' WHERE username='polloc
I'm not sure what the problem is, can someone supply some help?