How can I fix this error?
$qry = "select id,pwd,username  from users where username='jimmy'";
$res = mysqli_query($conn,$qry);
$row = mysqli_fetch_array($res);
$count = mysqli_num_rows($row); // if uname/pass correct it returns must be 1 row
How can I fix this error?
$qry = "select id,pwd,username  from users where username='jimmy'";
$res = mysqli_query($conn,$qry);
$row = mysqli_fetch_array($res);
$count = mysqli_num_rows($row); // if uname/pass correct it returns must be 1 row
 
    
     
    
    As the error says  the parameter should be a mysqli_result object. So use the returned value from your mysqli_query() call
$res=mysqli_query($conn,$qry);
$count = mysqli_num_rows($res);
//                       ^^^^
$row=mysqli_fetch_array($res);
 
    
    this is the problem
$count = mysqli_num_rows($row); 
this should be
$count = mysqli_num_rows($res); 
