Hi,
i'm doing a validation of registration form, and i'm checking if there's the same username and email:
$query_verify_email = "SELECT * FROM alunos WHERE username ='".$username."' AND email_aluno='".$email."'";
$result_verify_email = mysql_query($query_verify_user, $connect);
//if the Query Failed ,similar to if($result_verify_email==false)
if (!$result_verify_email)
How do i do both checks separated?
Does the AND operator works, like:
$query_verify_user= "SELECT * FROM alunos WHERE username ='".$username."'";
$result_verify_user = mysql_query($query_verify_email, $connect);
$query_verify_email = "SELECT * FROM alunos WHERE email_aluno='".$email."'";
$result_verify_email = mysql_query($query_verify_email, $connect);
//if the Query Failed ,similar to if($result_verify_email==false)
if (!$result_verify_user AND $result_verify_email)
Can someone help me?
Thank you,
PF2G