Advertisement
Guest User

Untitled

a guest
Feb 15th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <php
  2. $username = $password ='';
  3. ?>
  4.  
  5. <form action = "login.php" method = "post">
  6. <input type = "text" name = "username"></br>
  7. <input type = "password" name = "password">
  8. <input type = "submit" name = "login" value="LOGIN">
  9. </form>
  10. <?php
  11.  
  12. if (isset($_POST['login'])){
  13. if(($_POST['username'] == 'admin') && ($_POST['password'] == 'password')){
  14. header('LOCATION:index.php');
  15. }
  16. else {
  17. echo 'ERROR: Invalid username and/or password.';
  18. }
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement