Quote:
mysqli_num_rows() expects parameter 1 to be in mysqli_result,bool given in
As per documentation of PHP:
mysql_query - Manual[
^] - when the query statement fails the call returns the boolean value FALSE.
It means, your query is returning FALSE and you expect a different type and have code based on it.
$row = mysqli_fetch_array($result);
Above, fetch query would not accept false as input parameter (which seems to be the value of $result). You need to act based on the $result value. Like:
$rows = mysqli_num_rows($query);
if($rows == 1){
}
else
{
}
OR
if($row){
}
} else{
}
Have a look at this to try and learn:
How to Create A Simple Login Form in PHP & MySQLi Tutorial ~ Softaox[
^]
Simple User Registration & Login Script in PHP and MySQLi | All PHP Tricks[
^]