<?php
if(isset($POST['submit'])){
$username=addslashes($POST['username']);
$password=addslashes($_POST['password']);
include 'db.php';
$sql="SELECT * FROM users WHERE number='$username' AND password='$password'";
$query=mysql_query($sql);
$row=mysql_num_rows($query);
if($username=="admin" && $password=="access"){
setcookie("ADMIN","YES",'0','/');
header("Location: admin/index.php");
exit;
}
if($row==0){
$msg="No record for provided account ID";
}
else{
setcookie("USERNAME",$username,0,'/');
header("Location: members/index.php");
}
}
?>
I keep geting error message
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/sorogate/public_html/royal/e-banking/royal/login.php on line 8
PLS HELP