Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once PS_ROOT.'/includes/configuration.php';
- include_once PS_ROOT.'/includes/connexion.php';
- include_once PS_ROOT.'/includes/functions.php';
- sec_session_start(); // Our custom secure way of starting a PHP session.
- // Variable with errors/succes
- $error_msg = "";
- $succes_msg = "";
- if (isset($_POST['username'], $_POST['password'])) {
- $username = $_POST['username'];
- $password = $_POST['password'];
- if(login($username, $password, $mysqli))
- $succes_msg .= "You are now connected";
- } else
- $error_msg .= 'Fields are empty';
- $_SESSION['error'] = $error_msg;
- $_SESSION['succes'] = $succes_msg;
- unset($error_msg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement