Guest User

Untitled

a guest
Jul 30th, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. $user = "admin";
  3. $pass = md5($_POST['pass']);
  4. $hash = "4322xxxxxxxxxxxxx";
  5.  
  6. if($user == "admin" && $pass == $hash)
  7. {
  8. header("Location: grantaccess.html");
  9. }
  10.  
  11. else
  12.  
  13. {
  14. $message='Please enter password';
  15. echo '<script type="text/javascript">window.alert("'.$message.'");</script>';
  16.  
  17. if(isset($_POST))
  18. {
  19. ?>
  20. <style>
  21. <?php include 'icss.css'; ?>
  22. </style>
  23.  
  24. <form class="login" method="POST" action="index.php">
  25. Please enter password<br> <input type="password" name="pass"></input>
  26. <input type="submit" name="submit" value="SUBMIT"></input>
  27. </form>
  28. <?}
  29. }
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment