I have an html form that asks for a username and password. Then it call a php file to check against the database.
I have this script in the php file.
<script language="JavaScript">
window.location.href = "address.php"
</script>
and below i have this:
if (($Username == $Loginusername) && ($Password == $Loginpassword))
{
echo("<script>window.location.href</script>");
and in the receiving file I have this:
<?
$from = getenv("HTTP_REFERER");
if ($from != "address.php")
{print(" Sorry you have tried to link to a page which does not accept visitors directly. <br>
<a href=http://backtologin.html>Click here to login now</a>");
exit;}
?>
I always get the error message even though the login is correct, where am I going wrong here?