i have a page on my site to log a user into my site. the code i have used is always stopping at the line of code which checks to see wether the !result is true or false and displays that code. so that means there is something wrong with the execution of the query. but what?? anyhelp??!
include_once('connect.php');
$query = "SELECT COUNT (*) FROM userid
WHERE username = '$username' AND
password = '$password'";
$result = mysql_query($query);
if(!$result)
{
echo $deny;
echo $tail;
exit();
}
$count = mysql_result( $result, 0, 0 );
if ( $count > 0 )
{
echo $in;
echo $tail;
exit();
}
else
{
echo $deny;
echo $tail;
exit();
}
}
?>