I'm trying to update a email field in Mysql through php.
i keep getting this 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 '@yahoo.com,
The cell in Mysql is varchar(100). The e-mail addres is typed in from a text box.
$insert_fbacc="UPDATE jos_users SET email=".$_POST['email']", WHERE id='$user->id'";
with the previous code, mysql updates only half of the email address, only the @yahoo.com
part.
i tried to convert $_POST['email'] to string and the result is the error i wrote.
EDIT:
Thanks guys, you're great!
I found out what it was... bad syntax and forgot to escape.
Thanks a lot!