Advertisement
GGMPL

Log in

Mar 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?
  2.     session_start();
  3.    
  4.     if ((!isset($_POST['uzytkownik'])) || (!isset($_POST['haslo'])))
  5.     {
  6.         header('Location: http://mrhoxell.cba.pl/index.php=?id=53');
  7.         exit();
  8.     }
  9.  
  10. $uzytkownik=isset($_POST["uzytkownik"])?$_POST["uzytkownik"]:'';
  11. $haslo=isset($_POST["haslo"])?$_POST["haslo"]:'';
  12.  
  13. if (strtolower($uzytkownik)=="guest123" && $haslo=="pass123")
  14.         {
  15.                 $_SESSION["id"]=time();
  16.         $_SESSION['zalogowany'] = true;
  17.         unset($_SESSION['blad']);
  18.                 header("Location: http://mrhoxell.cba.pl/index.php=?id=532");
  19.                 exit();
  20.         }
  21.         else
  22.         {
  23.                 $komunikat='Niepoprawny identyfikator lub hasło';
  24.         $_SESSION['blad'] = '<span style="color:red">Nieprawidłowy login lub hasło!</span>';
  25.         header('Location: http://mrhoxell.cba.pl/index.php=?id=53');
  26.                
  27.     }
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement