fireblade
06-12-2007, 01:37 AM
I am gettin an erro msg when trying to enter my newsletter registration details to the database.
function process_nl($id) {
$name=$_POST['txtname'];
$email=$_POST['txtemail'];
$SQL = "INSERT INTO nletter (name, email) VALUES ($name, $email)";
if(mysql_query($SQL,$id)) {
return true;
exit;
}
else
return false;
}
error
You have an error in your SQL syntax near '@yahoo.com)' at line 1
is it a problem vth the @ symbol?? How can i do this?? please explain me the way to convert the @ symbol and process the job done..
function process_nl($id) {
$name=$_POST['txtname'];
$email=$_POST['txtemail'];
$SQL = "INSERT INTO nletter (name, email) VALUES ($name, $email)";
if(mysql_query($SQL,$id)) {
return true;
exit;
}
else
return false;
}
error
You have an error in your SQL syntax near '@yahoo.com)' at line 1
is it a problem vth the @ symbol?? How can i do this?? please explain me the way to convert the @ symbol and process the job done..