summaryrefslogtreecommitdiff
path: root/login.php
diff options
context:
space:
mode:
Diffstat (limited to 'login.php')
-rw-r--r--login.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/login.php b/login.php
new file mode 100644
index 0000000..ec71cde
--- /dev/null
+++ b/login.php
@@ -0,0 +1,20 @@
+<?php
+
+# include the main site config where various global variables
+# and libraries are included
+require("config.php");
+
+# pretty simple. check their credentials and then send them back
+# to the index page. if the login succeeded then the proper
+# session variables will be set and the index page will automatically
+# do what is necessary
+
+if ( isset($_POST['doLogin']) ) {
+ validateUser($_POST['username'],$_POST['password']);
+}
+
+# send the user back wherever they were when they logged in
+header("Location: {$config->_previousUri}");
+exit;
+
+?>