Mianowicie:
Kiedy jestem wylogowany okno wygląda tak:

Po zalogowaniu się:

A oto kod żródłowy:
index.php
<? include "config.php"; include "style.css"; echo '<center><table width="1024" border="1" height="200"> <tr> <td> </td> </tr> </table>'; include 'login.php'; } else { include 'view.php'; } ?> <html> <head> <title>Strona</title> </head> <body> </body> </html>
login.php
<? include "config.php"; $error=''; } } } if ( ($user == $r['user']) && ($pass == $r['pass']) ) { $_SESSION['valid'] = 1; $_SESSION['user'] = $r['user']; } else { $error = 'Niepoprawne dane użytkownika lub hasło.'; } } ?> <? include "style.css"; ?> <html> <head> <title>Logowanie</title> </head> <body> <? ?> <table width="235"> <form action="<?= $_SERVER['PHP_SELF'] ?>" method="post"> <td colspan="3">Zaloguj się :P</td> <tr> <td>Logi: </td><td><input type="test" name="user" class="pole" maxlength="12" value="<?= @$user ?>"></td> <br /> </tr><tr> <td>Haslo: </td><td><input type="password" name="pass" class="pole" maxlength="12" value="<?= @$pass ?>"> </td> </tr><tr> <td valign="top"><input type="submit" value="Zaloguj" class="przycisk" /></form></td> <td ><form action="register.php" method="post"><input type="submit" value="Rejestracja" class="przycisk" /></form> </tr> <tr height="67"></tr> </table> </form> </body> </html>
view.php
<? include "config.php"; } ?> <? include "style.css"; ?> <html> <head> <title>Elo</title> </head> <body> <br> <table width="235"> <tr> <td> Witaj!<br> </td> </tr> <tr> <td> <a href="login.php?logoff=true"> Logout</a></td> </tr> <tr height="112"></tr> </table> </body> </html>