Advertisement
Guest User

Untitled

a guest
Mar 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['username']) && isset($_POST['password']))
  3. {
  4. $user = $_POST['username'];
  5. $pass = $_POST['password'];
  6.  
  7. if ($user === 'admin' && $pass === 'password')
  8. {
  9. //do something
  10. }
  11. else
  12. {
  13. //do something
  14. }
  15. }
  16. ?>
  17.  
  18. <!DOCTYPE html>
  19. <html>
  20. <head>
  21. <title>Login</title>
  22. </head>
  23. <body>
  24. <h1>login?</h1>
  25.  
  26. <form method="POST" action="">
  27. <input type="text" name="username" placeholder="Username">
  28. <input type="password" name="password" placeholder="Password">
  29. <input type="submit" value="Submit">
  30. </form>
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement