-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.php
More file actions
39 lines (32 loc) · 1.05 KB
/
logout.php
File metadata and controls
39 lines (32 loc) · 1.05 KB
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
<?php
session_start();
//==========================================================================
// logout.php
//
// logs a user out of the vehicle service tracker
//
// Copyright (c) 2006 Kenneth J. Snyder
// Licensed under the GNU GPL. For full terms see the file LICENSE
// -------------------------------------------------------------------------
//
// Created: 10Mar2006 Snyder, Kenneth J. 73blazer@snyderworld.org
//
// Revised:
//
//==========================================================================
if (isset($_SESSION['SID'])) { $SID=$_SESSION['SID']; }
if (isset($_SESSION['USERNAME'])) { $USERNAME=$_SESSION['USERNAME'];}
include_once("includes.php");
$dbconn = mysqli_connect($my_host, $my_user, $dbpasswd, $dbname);
if (!$dbconn) {
$a = "Mysql Connect Failed. MySQL might not be running";
echo($a);
} else {
authuser($dbconn,$USERNAME,$SID);
$LogoutUpdate="update clients set SID='LOGGEDOUT' where USRNAME='$USERNAME'";
$dbconn->query($LogoutUpdate);
session_destroy();
$header="Location: ".$homepage.$webpath;
header($header);
}
?>