Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once("functions.inc.php");
- // get user and password from POST
- if (!empty($_POST)) {
- $username = $_POST['email'];
- $password = $_POST['password'];
- // check if user can login
- if ( canIlogin($username, $password)) {
- // remember that the user has logged in (cookies)
- setcookie("login", $username, time());
- // if ok -> redirect naar index.php
- header('Location: index.php');
- }
- else {
- $error = "Login failed";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement