Code:
I get this error:
Can anyone help?
PHP:
if (eregi('^[[:alnum:]\.\'\-]{4,30}$', stripslashes(trim($_POST['password']))) ) {
$password = $_POST['password'];
$password = mysql_real_escape_string($password);
$result = mysql_query("SELECT * FROM users WHERE username= '$username', password = '$password'");
$count = mysql_num_rows($result);
}
else {
$errors[] = '<font color="red">Invaild Password</font>';
}
if ($count==1) {
//session_register("username");
//session_register("password");
$_SESSION["int_userid"] = user_id;
}
else {
$errors[] = '<font color="red">Invaild Password or Username</font>';
I get this error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/group2k8/public_html/test_area/login.php on line 26
Can anyone help?