Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4. $_SESSION['authenticated'] = false;
  5. require 'aplikacia\Uzivatel.php';
  6.  
  7. use Aplikacia\Uzivatel as User;
  8.  
  9. if ( $_SESSION['authenticated'] == true)
  10. {
  11.     echo "Už ste prihlásený!";
  12.     header("location: index.php");
  13. }elseif (isset($_POST['login']) and isset($_POST['password']))
  14. {
  15.     $username = $_POST['login'];
  16.     $password = $_POST['password'];
  17.     $login = new User($username, $password);
  18.     $login->prihlasenie($username, $password);
  19. }else
  20. {
  21.     header("location: index.php");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement