-1

I have made this PHP code but again and again, this warning is coming

Warning: mysql_num_rows() expects parameter 1 to be resource, object given in G:\xampp\htdocs\Project1\login.php on line 11

Here is the code enter code here:

<?php $con=mysqli_connect('localhost','Medical','MED1234','Medicine'); mysqli_select_db($con,'Medicine'); $use= $_POST['user']; $pas= $_POST['pass']; $q="select * from login where Username='$use' and Password='$pas' "; $result=mysqli_query($con,$q); $count=mysql_num_rows($result); if($count==1) { header("location: list1.html"); } else { echo "Wrong Credentials"; } mysqli_close($con); ?> 
0

1 Answer 1

0

You're using mysql_num_rows() instead of mysqli_num_rows().

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.