|
CS479/579 - Web Programming II
|
Displaying ./code/Sessions/logout.php
<?php
include "auth.php";
$auth = new Auth();
if ($auth->authenticated() == false) header("location: login.php");
$auth->logout();
// include "config.php";
// if (!isset($_COOKIE['MY_SESSION'])) header("location: login.php");
// $sid = $_COOKIE['MY_SESSION'];
//
// $stmt = $myconn->prepare("DELETE FROM session WHERE sid = ?");
// $stmt->bind_param("s", $sid);
// $stmt->execute();
// $stmt->close();
//
// setcookie("MY_SESSION", "", time()-24*60*60);
header("location: login.php");
?>
|