Hi, i need help to solve this case, I'm trying to create login forms, and i got errors it said
"mysql_num_rows() expects parameter 1 to be resource, boolean given in line 18.
i can't figure out what this mean and how to solve it. here is code, please see line 18 in bold where it said
// Connect to server and select databse.
// Define $myusername and $mypassword
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM `members` WHERE username='$myusername' and password='$mypassword'";
// Mysql_num_row is counting table row
// If result matched $myusername and $mypassword, table row must be 1 row
// Register $myusername, $mypassword and redirect to file "login_success.php"
$_SESSION['myusername'] = $myusername;
can anyone help me what to write that code to solve this, because I'm still not get it.