I'm trying to write a simple login form. But I'm always directed to the same page whatever password I enter. I'm new to php so excuse my simple question.
<?php
if(isset($_POST['password'])) {
if($_POST['password'] == 'admin') {
header ( 'Location: home.html ');
}
else {
echo "Wrong Password";
exit ;
}
}
?>
<html>
<form action="index.php" method ="POST">
Please Enter the Password:
</br>
<input type= "password" name= "password" />
<input type = "submit" value = "Go!" />
</form>
</html>