php mysql insert
Posted: Tue Sep 09, 2008 10:40 pm
This is driving me crazy that I can't fix this.
When inserting into a table I get this error on my page: 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 ''user@domain.com' at line 1.
The code that is doing it is this
How do I fix this?
When inserting into a table I get this error on my page: 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 ''user@domain.com' at line 1.
The code that is doing it is this
Code: Select all
$register = mysql_query("Insert into newsletter_users (email, keye, groupe, name) values ('{$_POST['email']}', $key, '0', '$name')") or die(mysql_error());