<?php
session_start();
$pass='1234';
if (!isset($_SESSION['pass'])&&!isset($_POST['pass'])){
echo '<form method="post" action="'.$_SERVER['PHP_SELF'].'">
<b>Пароль</b><br/><input type="password" name = "pass" maxlength="14" title="pass"/><br/>
<input type="submit" value="Вход"<br/>';
die;}
if (!isset($_SESSION['pass'])&&isset($_POST['pass']))
$_SESSION['pass']=$_POST['pass'];
if ($_SESSION['pass']!=$pass){echo 'LOL';
session_destroy();
exit();}
?>