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.
Not able to locate the call in your bunch of code provided. But, it means, your uery is returning FALSE and you expect a different type and have code based on it.
Handle the condition based on returned data appropriately.