Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <form action="/checkUser.php" method="post" target="_blank">
  6. Username: <input type="text" name="username"><br>
  7. Password: <input type="text" name="password"><br>
  8. <input type="submit" value="Submit">
  9. </form>
  10.  
  11. <p>Click on the submit button, and the input will be sent to a page on the server called "/action_page.php".</p>
  12.  
  13. </body>
  14. </html>
  15.  
  16. <?php
  17. $username = _POST("username");
  18. $password = _POST("password");
  19.  
  20. $un = ["eliez","greatGuy","blogger"];
  21. $pw = ["tr789ial","abc123","23seventeen23"]
  22.  
  23. for($x =0; $x < 3; $x++){
  24. if($username == $un[x] && $password == $pw[x])
  25. echo "You have sucessdully logged in!"
  26. else
  27. "Sorry, wrong information has been entered"!
  28. }
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement