Advertisement
Guest User

Untitled

a guest
Sep 1st, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2.  
  3. if (isset($_POST['submit'])) {
  4.     //formen er submitted
  5.         if ($_POST['username'] != '' && $_POST['password'] != '') {
  6.                 //Formen er udfyldt
  7.                 if ($_POST['username'] == 'admin' && $_POST['password'] == 'admin') {
  8.                     //Du er logget ind med admin
  9.                     session_start();
  10.                     $_SESSION['username'] = $_POST['username'];
  11.                     header('LOCATION: ../index.php?page=Login&?status=ok');
  12.                 }else{
  13.                     header('LOCATION: ../index.php?page=Login&?error=3');
  14.                 }
  15.         }else{
  16.             header('LOCATION: ../index.php?page=Login&?error2');
  17.         }
  18.     }else{
  19.     header('LOCATION: ../index.php?page=Login&?error=1');
  20. }
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement