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 '@gmail.co, WHERE id=2' at line 1
This is the code I've created for it:
// save the account info if the button was pressed.
if(isset($_POST['save_account'])){
$id = $_SESSION['id'];
$realname = $_POST['realname'];
$email = $_POST['email'];
$realname = mysql_real_escape_string($realname);
$email = mysql_real_escape_string($email);
mysql_query("UPDATE `users` SET `realname`=$realname, `email`=$email, WHERE `id`=$id") or die(mysql_error());
$_SESSION['success'] = 'Your site settings have been successfully updated.';
}
If anyone could help me with this, it would be much appreciated!

New Topic/Question
Reply


MultiQuote


|