Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>FORM </title>
  5. </head>
  6. <body>
  7. <form action="sam1.php" method="POST">
  8. <fieldset style="width:30%">
  9. Enter Username:<br>
  10. <input type="text" name="un"><br>
  11. Enter Password: <br>
  12. <input type="password" name="password"><br>
  13. Confirm Password: <br>
  14. <input type="password" name="confirm">
  15. <br>
  16. <input type="submit" value="Sumbit">
  17. </fieldset>
  18. <form>
  19. <?php
  20. $name = $_POST["un"];
  21. $password = $_POST["password"];
  22. $confirm = $_POST["confirm"];
  23. if(isset($_POST["submit"]))
  24. {
  25. if ($password == $confirm)
  26. {
  27. echo "password match";
  28. echo "<br>";
  29. echo "UserName: $name";
  30. echo "<br>";
  31. echo "Password: $password";
  32. echo "<br>";
  33. }
  34. elseif ($password != $confirm)
  35. {
  36. echo "Passwords didnt match.";
  37. break;
  38. }
  39. }
  40. ?>
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement