Advertisement
Guest User

Untitled

a guest
May 18th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /* Index.html */
  2. <form action="login.php" method="post">
  3. <input type="text" name="username" /><br />
  4. <input type="password" name="password" /><br />
  5. <input type="submit" name="submit" value="Login" />
  6. </form>
  7.  
  8. /* Login.php */
  9. <?php
  10. $username = $_POST['username'];
  11. $password = $_POST['password'];
  12.  
  13. if (!empty($username) && !empty($password)) {
  14. echo "You entered username:" . $username . " and password:" . $password . ";
  15. }
  16. else {
  17. echo "You have left a field empty.";
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement