/var/www/chingyingtkd.club/admin/logout.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

//require 'db_connect.php';
require 'check_login.php';

if (
$logged_in == 0) {
    die(
'You are not logged in so you cannot log out.');
}


unset(
$_SESSION['username']);
unset(
$_SESSION['password']);
// kill session variables
$_SESSION = array(); // reset session array
session_destroy();   // destroy session.
header('Location: index.php');
// redirect them to anywhere you like.
?>