no tak som si zase pomohol sam
hodim to sem, keby sa to este niekomu hodilo

vysledok mate tu:
<?
session_start();
// start password protection code:
// store hash of password
$cmp_pass = md5("htiaf");
if(!empty($_POST['pass']))
{
// store md5'ed password
$_SESSION['pass'] = md5($_POST['pass']);
}
// if they match, it's ok
if($_SESSION['pass']!=$cmp_pass)
{
// otherwise, give login page
?>
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=windows-1250">
<title>password</title>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<h4>Password Protected</h4>
<input type="password" name="pass">
<input type="submit" value="login">
</form>
</body>
</html>
<?
// and exit
exit();
}
?>
<html>
<head>
<body>
<p align="center">funguje:P</p>
</body>
</head>
</html>