I'm trying to create a site that has a page, where the user needs to enter a password, after entering the password, if it correctly redirects the user to a home page, otherwise it displays an error message, I'm not exactly sure what is going wrong, since when I click on the button I'm just redirected to the php page that appears right after the error msg.
Form index.html:
<form id="formPassword" action="php/verificar.php" method="POST">
                   
<label for="password">Password:</label>
<input id='password' type='password' name="password" size='15' maxlength='15' onfocus="value=''"/>
<br>
<br>
                               
<input id='button' src='images/enter_button.png' onmouseover="this.src='images/enter_button_hover.png'" onmouseout="this.src='images/enter_button.png'" alt='Enter' type='image' width='150px' height='30px'/>
</form>
php page:
<!DOCTYPE html>
<html lang="en">
<head>
<title>
</title>
</head>
<body>
<?php
$password = $_POST['password'];
if($password=="senha"){
include("home.php");
}else{
echo "<p>Username or Password not entered correctly please try again.</p>";
}
?>
</body>
</html>