Plik index.php :
<?php $admin=$_SESSION['discofmnick']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-type" content="text/html;charset=windows-1250" /> <meta name="Authoring_tool" content="x" /> <meta http-equiv="Reply-to" content="x" /> <meta name="Description" content="x" /> <meta http-equiv="content-language" content="pl" /> <meta name="author" content="x" /> <title>x</title> <link rel="stylesheet" href="../style.css" type="text/css" /> </head> <html> <body> <?php switch($_GET['page']) { case 'login': include('include/login.php'); break; case 'logout': include('include/logout.php'); break; } if (!$admin) { ?> <div id="loginform"><div> <div style="text-align: center;">Panel administracyjny</div> <form action="index.php?page=login" method="post"> <p><label>Login:</label> <input type="text" name="login" value="" id="log" /> </p> <p><label>Haslo:</label> <input type="password" name="haslo" value="" /> </p> <div style="text-align:center"><input type="submit" name="action" value="Zaloguj" class="but" /></div> </form> </div></div> </form> <?php } else { } ?> </html> </body>
Plik login.php:
<?php $login = $_POST['login']; $haslo = $_POST['haslo']; if (($login=='admin') AND $haslo=='haslo') { $_SESSION['discofmnick']="ddsadsadsadsa"; $_SESSION['discofmhaslo'] = 'haslo'; exit; } ?>
Co jest tutaj nie tak ?

Dzięki z góry!