I've been working on this for hours, can't seem to figure out why its not working.
All of the tutorials I've looked at showed that this worked fine. The output of num_rows
is greater than 1
and yet it still goes inside the if
statement.
Also it returns 1
even when it should be 0
. Maybe it's a BOOL
?
if($test = mysqli_num_rows($result) == 0){
echo "Username and Email are Available test= $test";
} else {
echo "Username and Email are TAKEN";
}