So I have this website I am making, and I keep running the PHP files as well as the html files, but the PHP one does not work correctly.
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AUTHENTICATION</title>
</head>
<body>
<form method="POST" action="PHP/password.php" style="text-align:center">
ENTER THE AUTHENTICATION CODE:
<input type = "password" name = "password" value = "">
<input type = "submit" value = "submit">
</form>
</body>
</html>
PHP:
<?php
if (isset($_POST['submit']))
{
$pass = $_POST['password']
if ($pass == "111")
{
header("Location: ../HTML/index1.html");
}else
{
{?>
<form method="POST" action="../PHP/password.php" style="text-align:center">
ENTER THE AUTHENTICATION CODE:
<input type = "password" name = "password" value = "">
<input type = "submit" value = "submit">
<br />
<font color = "red">incorrect password!</font>
</form>
<?}
}
}
?>
The PHP is supposed to get what you typed, and if it is equal to "111" it redirects you to a different part of the website. If it does not, it tells you the password is incorrect, and runs the else. But, no matter what I type, it considers the password "wrong" and does the "else" part of the code. Any help?
picture of directory: https://gyazo.com/7d49b063cd5dfaf6405e3704b3f3fa96
NOTE: I do NOT care about changing this to be more secure as it is a hobby I am working on.