...

View Full Version : display fields from contact form



bufhal
06-07-2006, 06:20 PM
Hi;
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.


<?php
session_cache_limiter('nocache');
session_start();

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">
<TR>
<TD width=600><BR>
<BR>

</TD></TR></TABLE>
<?
Print_footer ();

?>

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


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

bufhal
06-07-2006, 06: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

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

bufhal
06-07-2006, 07: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

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

bufhal
06-07-2006, 07: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";

Tynan
06-08-2006, 06: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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum