span style="color: #0000BB"><?php//session_set_cookie_params(86400, '/');session_start();$login = 'login';$password = 'password';if (isset($_SESSION['auth']) && $_SESSION['auth'] === true) { echo 'Authorized from session';} else if ($_POST && @$_POST['login'] == $login && @$_POST['password'] == $password) { $_SESSION['auth'] = true; echo 'Authorized from POST';} else { echo '<form method="post" action="' .$_SERVER['PHP_SELF'] . '">Login: <input name="login"/><br/>Password: <input name="password"/><br /><input type="submit"/></form>';} |