require('menu.php'); session_register('loged_in'); $_SESSION['loged_in']=-1; if (isset($_POST['login'])) { $u=$_POST['login']; $p=$_POST['pass']; $result=mysql_query("select * from user where login='$u' and password=md5('$p') "); if (mysql_num_rows($result)!=0) { $_SESSION['loged_in']=1; } header("Location: new.php"); } $body='
'; require($templ); ?>