Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Vor jeder HTML Datei:
  2. <? session_start();
  3. session_destroy(); //DEBUG
  4. if(!(isset($_SESSION['login']))){
  5. header("Location: ttest.php");
  6. }
  7. ?>
  8.  
  9. pw.php in der Datei:
  10. <?php
  11. $username = $_POST["username"];
  12. $password = $_POST["password"];
  13.  
  14. if($username == "admin" && $password == "pass"){
  15. session_start();
  16. $_SESSION['login'] = true;
  17. header("Location: index.php");
  18. }
  19. else{
  20. header("Location: ttest.php");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement