I keep getting this error message and I've looked everywhere on what I can do to fix it but I couldn't find anything. Any help will be greatly appreciated.
I'm trying to create a local server database for an android app I'm making on Android Studio
so I'm trying to work on the login stuff. But I can't move forward unless I fix this error.
Error: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp64\www\login.php on line 9
Code:
require "conn.php"; // Connection
$user_name = "123";
$user_pass = "123";
$mysql_qry = "select * from employee_data where username like '$user_name' and password like '$user_pass';";
$result = mysqli_query($conn, $mysql_qry);
if (mysqli_num_rows ($result) > 0) {
echo "Login Successful!";
} else {
echo "Login Unsucessful!";
}