Article 4W98X Using PHP form - only show data after submit is triggered

Using PHP form - only show data after submit is triggered

by
pizzipie
from LinuxQuestions.org on (#4W98X)
How can I stop the high-lighted text from showing when form loads. I only
want to see it and the associated data afterthe form is submitted.

Thanks in advance for help.

Code:<!DOCTYPE html>

<html>
<body>

<form action="" method="post"><!-- myform.php -->
<p>Your Name: <input type="text" name="yourname" /><br />
E-mail: <input type="text" name="email" /></p>

<p>Do you like this website?
<input type="radio" name="likeit" value="Yes" checked="checked" /> Yes
<input type="radio" name="likeit" value="No" /> No
<input type="radio" name="likeit" value="Not sure" /> Not sure</p>

<p>Your comments:<br />
<textarea name="comments" rows="10" cols="40"></textarea></p>

<p><input type="submit" value="Send it!"></p>
</form>

Your name is: <?php echo $_POST['yourname']; ?><br />
Your e-mail:<?php echo $_POST['email']; ?><br />
<br />

Do you like this website? <?php echo $_POST['likeit']; ?><br />
<br />

Comments:<br />
<?php echo $_POST['comments']; ?>

</body>
</html>
Attached Thumbnailsattachment.php?attachmentid=32068&stc=1& latest?d=yIl2AUoC8zA latest?i=U9ZDA8N8cWA:b1b-tIEjeHY:F7zBnMy latest?i=U9ZDA8N8cWA:b1b-tIEjeHY:V_sGLiP latest?d=qj6IDK7rITs latest?i=U9ZDA8N8cWA:b1b-tIEjeHY:gIN9vFwU9ZDA8N8cWA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments