Hi there boys!
I think i have a little conversion problem to my application;
i am tring to retrive the number of rows in mysql to make the login script and .. it tels me this error;
if(isset($_POST['activateLoginForm'])) {
$user = trim($_POST['username']);
$pass = trim($_POST['passwords']);
echo $user."\n";
echo $pass;
$conn = new sqlServer();
$conn->setHost("localhost");
$conn->setUser("root");
$conn->setPassword("root");
$conn->openConn();
$query = "SELECT count(*) from members where username ='$user' AND password='$pass'";
$result = mysql_query($query);
$count = mysql_num_rows($result);
echo $count;
if ( $count == 0) { die("invalid username and password"); }
}
And .. when i run the page:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp\xampp\htdocs\work\orders\login_check.php on line 20
Does somebody knows what should i do? :(