I want user to land on a different page, if login is successful which is not working. Please have a look at the below code and assist me on the issue.
$result = mysql_query("SELECT * FROM users where EMAIL='$username' and PASSWORD='$password'", $link);
$num_rows = mysql_num_rows($result);
if ($num_rows==0)
echo "<h4><center>Invalid Username or password. Please <a href='login.php'>click here</a> to go back to Login page</center></h4>";
else
{
header('Location: http://xxxx/test.php');
}
Please help me out. Thanks in advance