\n"; echo "\n"; if (isset($_POST['login'])) { if(check_user($_POST['username'], $_POST['password'])) { $_SESSION['logged_in'] = true; $_SESSION['username'] = $_POST['username']; } else { echo ''."\n"; } } else if (isset($_POST['logout'])) { session_destroy(); $_SESSION['logged_in'] = false; } if (isset($_SESSION['logged_in']) && $_SESSION['logged_in']) { echo ''."\n"; echo ''."\n"; } else { echo ''."\n"; } echo "";