Advertisement
Guest User

Untitled

a guest
Dec 24th, 2022
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  2. <input type="password" name="pwd" id="pwd"><input type="submit">
  3. </form>
  4.  
  5. <?php
  6. $pwd = $_GET['pwd']; // you should sanitize this, but I have beer to drink
  7. if($pwd) { // this is just checking if the $pwd variable is set
  8. if($pwd == "trex") { // check if the password is trex
  9. header(location: 'https://www.youtube.com/watch?v=BXpgIQV0-R0'); // send them to another url
  10. } else { // otherwise tell them the pass is wrong
  11. echo "Wrong password!";
  12. }
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement