Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form method="post" action="">
- Your name:
- <br>
- <input type="text" name="name">
- <br><br>
- What is the best thing about learning to code:
- <br>
- <input type="text" name="best">
- <br><br>
- <input type="submit" value="Submit Answers">
- </form>
- <!-- Using PHP to print output that user entered in the form -->
- <div id="form-output">
- <p id="name"> Hello, <?= $_POST["name"]?>! </p> <!-- input name from above -->
- <p id="best"> I am glad you enjoy <?= $_POST['best']?>. </p>
- </div>
- <a href="index.php">Reset</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement