Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2.  
  3. $login = "admin";
  4. $password = "admin";
  5.  
  6. if (isset($_POST['submit'])) {
  7. if ($_POST['login'] == $login && $_POST['password'] == $password) {
  8. header('Location: http://test:81/auth.php'); exit;
  9. }
  10. else {
  11. echo "Неверный логин или пароль";
  12. }
  13. }
  14. ?>
  15. <!DOCTYPE html>
  16. <html>
  17. <head>
  18. <title></title>
  19. </head>
  20. <body>
  21. <form action="action.php" method="POST">
  22. <p>Логин<input type="text" name="login"/></p>
  23. <p>Пароль<input type="text" name="password"/></p>
  24. <input type="submit" name="submit" value="Оправить" />
  25. </form>
  26. </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement