-
Notifications
You must be signed in to change notification settings - Fork 2
/
logout.php
40 lines (36 loc) · 959 Bytes
/
logout.php
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
<?php include "db_connect.php";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<LINK href="stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="header">
<img src="logo.jpg"/>
</div>
<div class="body">
<table cellspacing="0"><tr><td>
<table padding-left="5px" cellspacing="0">
</table></td>
</table>
<table cellspacing="0"><tr>
<td class="content"><h2>Logout</h2><h5>
<?php
if(session_destroy()){
echo "<p>Logged out successfully!</p>\n";
echo '<form method="post" action="home.php">
<input type="submit" value="Back" name="back" />
</form>';
}
else{
echo "<p>Could not log you out!</p>\n";
echo '<form method="post" action="home.php">
<input type="submit" value="Back" name="back" />
</form>';
}
?>
</h5></td></tr>
</table
</div>
</body>
</html>