<?php require_once "config.php"; echo '<link rel="stylesheet" type="text/css" href="style.css">'; switch($act) { case "sid": if($admin==$_POST['log'] && $passwd==$_POST['pass']) { $_SESSION['admin']=$log; echo 'Вы успешно автори!<br><a href="guest.php">Далее</a><br>'; } else { echo 'Авторизация провалена!<br>'; session_destroy(); } break; default: echo '<form action="admin.php?act=sid" method="POST"> Логин:<br><input type="text" name="log"><br> Пароль:<br><input type="password" name="pass"> <input type="submit" value="Войти"></form><br>'; break; } include_once "foot.php"; ?>