This is my first experience with mysqli. It seems to be looking for the name of a result set in between the parentheses in mysqli_num_rows(). Yet when I tried $stmt, $conn,
You're combining procedural and object oriented approaches, when you only want object oriented. Change
$num=mysqli_num_rows($WHAT);
to
$num = $stmt->num_rows();