auth.php<?php
$password = '827ccb0eea8a706c4c34a16891f84e7b'; //пароль 12345
header('Content-Type: text/html; charset=utf-8');
if ( !empty( $_REQUEST['password'] ) and md5($_REQUEST['password']) == $password ) {
session_start();
$_SESSION['auth'] = true;
} else {
if ( !empty($_REQUEST['password']) and md5($_REQUEST['password']) != $password ) {
echo 'Неправильный пароль!<br>'; //выведем сообщение об ошибке
}
?>
<form action='auth.php' method='POST'> //ИЗМЕНЕНИЕ
<input name='password' type='password'>
<input type='submit' value='Отправить'>
</form>
<?php
}
?>