-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLogout.php
More file actions
43 lines (35 loc) · 997 Bytes
/
Logout.php
File metadata and controls
43 lines (35 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>COJO OLYMPIC GAMES :: LOG OUT PAGE</title>
<?php include "inc/resources.php" ?>
</head>
<body>
<div class="wrapper">
<header>
<h1>COJO OLYMPICS</h1>
</header>
<a href="member_login.php" class="LOG IN AGAIN "> LOG IN BACK ?</a>
<?php
// Initialize the session
session_start();
// Unset all of the session variables
$_SESSION = array();
if(isset ($_SESSION['loggedin']) && $_SESSION['loggedin'])
{
// Destroy the session.
session_destroy();
// Redirect to login page
header("location: member_login.php");
exit;
echo "<p id='connectMsg' class='alert alert-success'>YOU ARE ALREADY LOGGED OUT, PLEASE ENTER YOUR USERNAME AND PASSWORD TO LOG IN AGAIN !</p>";
}
else
{
echo "<p id='connectMsg' class='alert alert-success'> =====> LOGGED OUT !</p>";
}
?>
</div>
</body>
</html>