Faqts : Computers : Programming : Shopping For You : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 45 people (42%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Is there a way to email the actual HTML form (same format) after a visitor has completed it?

Nov 27th, 2008 10:14
healthy man, dman, Narendra Jain, Tim Neuman, http://www.ttnr.org


The variables which are used in the form are always submitted to the 
web server via the HTTP_VARS. e.g.
<INPUT type="text" maxlength="20" name="first_name">
<INPUT type="text" maxlength="50" name="email_address">
The value a person enters will be available as $first_name and 
$email_adress. You can then compose an e-mail message and send it out 
as below:
$to = $email_address
$from = "[email protected]";
$subject = "Your data recieved";
$msg = "You just submitted the following name on our web site".
       "\n First Name :". $first_name.
       "\n".
       "\n We appreciate you submission. Thanks";
mail("$to","$from","$subject","$msg");
And you are done!
Hope that helps...
Narendra Jain
http://www.healthdothealth.com
http://www.healthxhealth.com
http://www.mesotheliomainmesothelioma.com
http://www.healthfirewall.com
http://www.flathealth.com
http://www.healthbodyguard.com