Hey
Im trying to use the following code to see if a user exists in my table:
Function CheckUser($input_user){
GLOBAL $hostname,$username,$password,$dbname,$root;
mydbconnect($hostname,$username,$password,$dbname);
$query = "SELECT * FROM Users WHERE User=Ben";
$result = MYSQL_QUERY($query);
$count = MYSQL_NUM_ROWS($result);
IF($count){
MYSQL_CLOSE();
CheckPass($input_user);
}else{
MYSQL_CLOSE();
Header("Location: $root/login.php?error=$input_user");
}
}
All it returns is:
Warning: Supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/dev/checklogin.php