<?php require("connection.php"); connection(); if ($imie!="" and $nazwisko!="" and $password!="") { $password = sha1($password); $zapytanie="SELECT id FROM users WHERE imie='$imie' and nazwisko='$nazwisko' and password ='$password'"; $id=$temp['id']; if ($ile==1) { $_SESSION['user_id']=$id; $_SESSION['imie']=$imie; $_SESSION['nazwisko']=$nazwisko; } } } else{ ?> <html> <body> <form action="logowanie.php" method="post"> <strong>Imie:</strong><input name="imie" type="text" value="" /><br> <strong>Nazwisko:</strong><input name="nazwisko" type="text" value="" /><br> <strong>Haslo:</strong><input name="password" type="password" value="" /><br> <input type="submit" value="Zaloguj" /> </form> </body> </html> <?php } ?>