If no mysql error happens, result is set. if ($result) //->true
No entry found is no error, its a 0 row result. if (mysqli_num_rows($result)) //->false
This is not best and shortest version but easy to understand:
$qz = "SELECT IsMember FROM UserAuthData WHERE email='".$email."' AND password='".$password."'";
$result = mysqli_query($con,$qz);
if ($result) {
if (mysqli_num_rows($result)) {
while($row = mysqli_fetch_array($result))
{
echo $row['IsMember']; //success
}
}
else
{
echo "-2"; //no entry found
}
}
else
{
echo ""; //mysql error
}
[/code:zd8jxqii]
Write mysql condition uppercase!
If you do more with this futher, look for "or die()" and "sprintf()".