I know these may sound like silly questions, but...
1.) What should a "Log-Out" feature do?
2.) How do you properly "Log-Out" a user?
Here is my best stab at things...
Sincerely,
Debbie
1.) What should a "Log-Out" feature do?
2.) How do you properly "Log-Out" a user?
Here is my best stab at things...
PHP Code:
<?php
// Initialize a session.
session_start();
//<!-- Include Constants -->
require_once('config/config.inc.php');
// Log Out User.
$_SESSION['loggedIn'] = FALSE;
// Redirect User.
if (isset($_SESSION['returnToPage'])){
header("Location: " . WEB_ROOT . $_SESSION['returnToPage']);
}else{
// Take user to Home Page.
header("Location: " . WEB_ROOT . "index.php");
}
// End script.
exit();
?>
Debbie
Comment