title: Warning: mysql_num_rows() expects parameter 1 to be resource, object given in G:\xampp\htdocs\Project1\login.php on line 11
body: <p>I have made this PHP code but again and again, this warning is coming</p>
  <blockquote>
  <p>Warning: mysql_num_rows() expects parameter 1 to be resource, object given in G:\xampp\htdocs\Project1\login.php on line 11</p>
  </blockquote>
  <p>Here is the code enter code here:</p>
  <pre><code>&lt;?php
  $con=mysqli_connect('localhost','Medical','MED1234','Medicine');
  mysqli_select_db($con,'Medicine');
  
  
  $use= $_POST['user'];
  $pas= $_POST['pass'];
  
  $q=&quot;select * from login where Username='$use' and Password='$pas' &quot;;
  $result=mysqli_query($con,$q);
  $count=mysql_num_rows($result);
  
  if($count==1)
  {
     header(&quot;location: list1.html&quot;);    
  }
  
   else
   {
      echo &quot;Wrong Credentials&quot;;
   }
  
  mysqli_close($con);
  
  ?&gt;
  </code></pre>