As already noted by
Richard, your query failed. See, for instance
PHP mysqli query() Function[
^] (have a look at 'return value' section).
You have to test the
$res
value, before calling
mysqli_num_rows($res)
, e.g.
if ( $res )
{
$count=mysqli_num_rows($res);
}
else
{
}