Advertisement
Guest User

sa

a guest
Oct 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ?>
  4. <!DOCTYPE HTML>
  5. <?php
  6. $username = "username";
  7. $password = "password";
  8.  
  9.  
  10. if (isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true) {
  11. header("location: tableManage.php");
  12. }
  13. if (isset($_POST['username']) && isset($_POST['password'])) {
  14. if ($_POST['username'] == $username && $_POST['password'] == $password) {
  15.  
  16. }
  17. $_SESSION['loggedIn'] == true;
  18. header("location: tableManage.php");
  19. }
  20. ?>
  21.  
  22.  
  23. <html>
  24.  
  25. <head>
  26.  
  27.  
  28. </head>
  29.  
  30. <body>
  31.  
  32.  
  33. <form method="post" action="tableManage.php">
  34. <p>Username:</p>
  35. <input type="text" name="username"><br>
  36. <p>Password:</p>
  37. <input type="password" name="password"><br>
  38. <input type="submit" value="Login">
  39. </form>
  40. </body>
  41.  
  42.  
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement