Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('./config.inc.php');
- require_once('./lib/db.php');
- require_once('./lib/login.php');
- try {
- $db = new DB;
- $login = new Login($db);
- /* Check if the form has been submitted. If not, redirect to login page */
- if(!isset($_POST['submit'])) {
- header("Location: index.php");
- exit;
- } else {
- $username = $_POST['username'];
- $password = $_POST['password'];
- /* Verify the login details are correct and redirect to secure.php */
- $login->verifyLogin($username, $password);
- }
- }
- catch(Exception $error) {
- print $error->getMessage();
- }
- ?>
Add Comment
Please, Sign In to add comment