View Full Version : display fields from contact form

06-07-2006, 07:20 PM
hope someone can help me.
I have a conact form with the following post command:
<form action="thankyou.php" method="post" name="contactform" id="contactform">
<input type="hidden" name="recipient" value="contactform" />
<input type="hidden" name="subject" value="Response from Web Form" />

My question is: How can I have the contact form typed input from the user display on my PHP page (i.e. the contact form uses <input type="text" name="Username" size="45" /></td>). How can the PHP display the results?

Below is the thankyou.php page.

Thank you very much in advance..I appreciate any help.


include "subs.php";

Print_header ("Get Password","",0);

<br><center><h1>Thank You!</h1></center><br>
<TABLE border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
<TD width=600><BR>

Print_footer ();


06-07-2006, 07:25 PM
use echo or print to display values in php, see below code.

<? echo $_GET['Username']; ?>

06-07-2006, 07:40 PM
Thank you.
will that display the data entered into the form on the previous page after the form is submitted?

I appreciate your time

06-07-2006, 08:02 PM
yes, it will.

06-07-2006, 08:18 PM
Thank you. One last question, please.
In am trying to find the new line char in PHP so the info will break to the next line. I tries /r
but got parse error.
Thanks for your help

06-07-2006, 08:26 PM
echo "\r";

06-07-2006, 08:29 PM
sorry to bother you again but is this what you mean?

echo $_POST['Realname']echo "\r";

echo $_POST['Username']echo "\r";

echo $_POST['Title']echo "\r";

echo $_POST['Company']echo "\r";

06-08-2006, 07:48 AM
I'm awful at this but only one echo at the start of the line

echo $_POST['Realname']."\r";

something like that anyway