summaryrefslogtreecommitdiff
path: root/logout.php
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2008-02-03 23:23:24 +0000
committerNathan Kinkade <nath@nkinka.de>2008-02-03 23:23:24 +0000
commitd895b852a6e160496ffc760d46d3719a3d62ff86 (patch)
tree52230bb04148197e8312e09b5c5273417e7a3be9 /logout.php
Initial checkin of nutridb.org and basic subversion directory structure
Diffstat (limited to 'logout.php')
-rw-r--r--logout.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/logout.php b/logout.php
new file mode 100644
index 0000000..50dcd76
--- /dev/null
+++ b/logout.php
@@ -0,0 +1,15 @@
+<?php
+
+# include the main site config where various global variables
+# and libraries are included
+require("config.php");
+
+# kill session variables and then the session itself
+session_unset();
+session_destroy();
+
+# send the user back to wherever they were
+header("Location: {$config->_previousUri}");
+exit;
+
+?>