rendered paste body<?php session_start(); define('SELF', basename(__FILE__)); if (isset($_GET['wyloguj'])) { session_destroy(); header('Location: ' . SELF);} elseif (isset($_SESSION['login'])) { echo 'Witaj ' . $_SESSION['login'] . '<br /> <a href="' . SELF . '?wyloguj=1">Wyloguj</a> | <a href="' . SELF . '">Dalej</a>';} else { if (isset($_POST['login'])) { $_SESSION['login'] = $_POST['login']; header('Location: ' . SELF); } else { echo '<form action="' . SELF . '" method="post"> <input name="login" type="text" /> <input type="submit" value="Zaloguj" /> </form>'; }} ?>