Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //include config
- require_once('includes/config.php');
- //check if already logged in move to home page
- if( $user->is_logged_in() ){ header('Location: index.php'); }
- //process login form if submitted
- if(isset($_POST['submit'])){
- $username = $_POST['username'];
- $password = $_POST['password'];
- if($user->login($username,$password)){
- $_SESSION['username'] = $username;
- header('Location: memberpage.php');
- exit;
- } else {
- $error[] = '<div class="error"><p>Wrong username or password or your account has not been activated.</p></div>';
- }
- }//end if submit
- //define page title
- $title = 'Login';
- //include header template
- require('layout/header.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement