I am tired of seeing this:
validate(pass)
{
if (pass =="password");
{
//go to page
}
else
{
alert("Password not valid");
}
}
Here is a PHP version that is much better.
<?php
if(($_POST['password'] == "password") && ($_POST['username'] == "username"));
{
//valid page show html
?>
Stick your protected html here
<?php
}
else
{
header("Location:http://google.com");
}
?>
validate(pass)
{
if (pass =="password");
{
//go to page
}
else
{
alert("Password not valid");
}
}
Here is a PHP version that is much better.
<?php
if(($_POST['password'] == "password") && ($_POST['username'] == "username"));
{
//valid page show html
?>
Stick your protected html here
<?php
}
else
{
header("Location:http://google.com");
}
?>