Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>FORM </title>
- </head>
- <body>
- <form action="sam1.php" method="POST">
- <fieldset style="width:30%">
- Enter Username:<br>
- <input type="text" name="un"><br>
- Enter Password: <br>
- <input type="password" name="password"><br>
- Confirm Password: <br>
- <input type="password" name="confirm">
- <br>
- <input type="submit" value="Sumbit">
- </fieldset>
- <form>
- <?php
- $name = $_POST["un"];
- $password = $_POST["password"];
- $confirm = $_POST["confirm"];
- if(isset($_POST["submit"]))
- {
- if ($password == $confirm)
- {
- echo "password match";
- echo "<br>";
- echo "UserName: $name";
- echo "<br>";
- echo "Password: $password";
- echo "<br>";
- }
- elseif ($password != $confirm)
- {
- echo "Passwords didnt match.";
- break;
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement