I am currently trying to build a PHP page that validates a username and password from a form against values stored in a mySQL database and them redirects based on success or failure.
Below you will find the code, my problem is $result returns "Resource id #2". Haven't a clue as to what is going on...
$db = mysql_connect($host, $user, $pass)
mysql_select_db($db_name,$db);
$sql = select username, password from users where username='$form_username' and password='$form_password'";
$result = mysql_query($sql);
if ($result){
header ("location: success.php");
}else{
header ("location: faliure.php");
}