I'm a new grue with php, When I write this code:
$query2="SELECT `User_id` FROM `users` WHERE `E-mail`=$email";
$sql2= mysql_query($query2);
if(mysql_num_rows( $sql2)>0){
$Name2=mysql_fetch_array($sql2);
$customer_id=$Name2[0];
echo $customer_id."ccccccccccc";
}
else{
$errormessage2="<font color='red'>Invalid Email,Try
again</font>"."Error description: ";
}
if($sql2 === FALSE) {
cho "erro";
echo mysql_error();
die(mysql_error());
}
I'm 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' at line 1
Can anyone help?