Advertisement
Guest User

check.php

a guest
Feb 21st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <style>
  5. .error {color: #FF0000;}
  6. </style>
  7. </head>
  8. <body>
  9.  
  10. <?php
  11. ini_set('session.gc_maxlifetime', 3*1);
  12. ?>
  13. <h2><center>Simple Wellness Login</center></h2>
  14. <center>
  15. <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  16. Username: <input type="text" name="username">
  17. <br><br>
  18. Password: <input type="text" name="pass" >
  19. <br><br>
  20. <input type="submit" name="submit" value="Submit">
  21. </form>
  22. </center>
  23. <?php
  24. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  25. session_start();
  26. $_SESSION["login_time"] = time();
  27. if ( $_POST["pass"] == "password" ) {
  28. header( 'Location: login.php' ) ;
  29. }
  30. }
  31. ?>
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement