<title>Logout</title> <meta charset="utf-8"> </head> <body> <h1>Log Out</h1> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <p> <input type="submit" name="single" value="Don't remember me in this browser/computer"> <input type="submit" name="all" value="Don't remember me on any computer"> </p> <p> <input type="submit" name="cancel" value="Cancel"> </p> </form> </body> </html> <?php } elseif (isset($_POST['single']) || isset($_POST['all'])) { $autologin = new AutoLogin($db); if (isset($_POST['single'])) { $autologin->logout(false); } else { $autologin->logout(true); } logout_sess(); } elseif (isset($_POST['logout'])) { logout_sess(); }
$stmt->bindParam(':username', $username); $stmt->execute(); $stored = $stmt->fetchColumn(); if (password_verify($pwd, $stored)) { session_regenerate_id(true); $_SESSION['revalidated'] = true; unset($_SESSION['invalid']); header('Location: ' . $_SESSION['return_to']); exit; } else { $error = 'Incorrect username or password'; $_SESSION['invalid']++; if ($_SESSION['invalid'] == $max_attempts) { if (isset($_SESSION['remember']) || isset($_SESSION['lynda_auth'])) { $autologin = new AutoLogin($db); $autologin->logout(); } logout_sess(); } } } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Revalidation</title> <link href="css/styles.css" rel="stylesheet" type="text/css"> </head> <body> <h1>Please Confirm Your Identity</h1>