i trying to verify the username and password in the data before allowing the user entry. this is my code. the results is that it skips and goes to the else statement
if(!empty($_POST['username']) && !empty($_POST['code']))
{
$checkcode = mysql_query("SELECT * FROM members WHERE Username = '".$username."' AND Code = '".$code."'");
if(mysql_num_rows($checkcode) == 1)
// $row = mysql_fetch_array($checkcode);
{
header("Location: home.php");
}
else
{
echo "<h1>Error</h1>";
echo "<p>Sorry, your account could not be found. Please <a href=\"index.php\">click here to try again</a>.</p>";
}
}