<?
include 'config.php';
?>
<form method=\"POST\" action=\"index.php?akcja=login\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">
<tr>
<td>Login: </td>
<td><input type=\"text\" name=\"login\" size=\"10\"></td>
</tr>
<tr>
<td>Hasło: </td>
<td><input type=\"password\" name=\"pass\" size=\"10\"></td>
</tr>
</table>
<input type=\"submit\" value=\"Zaloguj\" name=\"Submit\">
</form>
<?
if (!$_SESSION['login'])
{ echo 'Nie jesteś zalogowany.'; } else { if ($_GET['akcja'] == 'login')
{
$sql = 'SELECT * FROM 'uzytkownik' WHERE login=$_POST[login]';
if ( $_POST['pass'] == $log['haslo'])
{
$_SESSION['login'] = $_log['login'];
$_SESSION['imie'] = $log['imie'];
echo 'Witaj '.$_SESSION['imie'].'.<br><a href=\"index.php?akcja=logout\">Wyloguj sie</a>.'; } else { echo 'Podano błedne dane.'; } }
if ($_GET['akcja'] == 'logout')
{
}
}
?>
No i nic. Jak się próbuje logować to absolutnie nic sie nie dzieje niezależnie do tego czy dobre czy złe dane...
Ten post edytował Wieviór 4.01.2005, 20:18:27