Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <?php
  2. include ('includes/header.php');
  3. spl_autoload_register(function ($class){include 'classes/' . $class . '.class.php';});?>
  4.  
  5.  
  6. <?php
  7.  
  8. $account = new Login();
  9.  
  10. if(isset($_REQUEST["send"])){
  11. if(strlen($_REQUEST["account"])>0 && strlen($_REQUEST["password"])>0){
  12. $account->checkInput($_REQUEST["account"], $_REQUEST["password"]);
  13. $usr = $_REQUEST["account"];
  14. $_SESSION['trueuser'] = $usr;
  15. } else {
  16. header("Location: admin.php");
  17. }
  18. unset($_REQUEST["send"]);
  19. exit();
  20. }
  21. ?>
  22.  
  23.  
  24.  
  25. <form method="post">
  26. <label>Användarnamn</label><br>
  27. <input type="text" name="account" class="account" /><br><br>
  28. <label>Lösenord</label><br>
  29. <input type="password" name="password" class="account" /><br>
  30. <br>
  31. <input type="submit" name="send" value="Logga in" class="button" />
  32. </form>
  33.  
  34.  
  35.  
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement