PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given - Stack Overfl
The query either returned no rows or is erroneus, thus FALSE is returned. Change it to if (!$dbc || mysqli_num_rows($dbc) == 0) mysqli_num_rows: Return Values Returns TRUE on success or FALSE on failure. For SELECT, SHOW, DESCRIBE or EXPLAIN ......