PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
$q = "INSERT INTO newsletter_users SET email = '".$_POST['email']."', keye = '".$key."', groupe = '0', name ='".$name."'"; // protect your queries against sql injection
$sql = mysql_query($q);
$q = "INSERT INTO newsletter_users SET email = '".$_POST['email']."', keye = '".$key."', groupe = '0', name ='".$name."'"; // protect your queries against sql injection
$sql = mysql_query($q);
I just tried that and I still get the same error as before.