Change the command mysql_num_rows->mysqli_num_rows