1. Create a form with as many as fields you want, name it "contact.php"
2. Create a "thank you" page, name it "thanks.php"
3. In "action" line of contact.php post it to your "thank you" page, it will be something like this:
CODE
<form action='thanks.php' method='POST' >
4. Add this code at the top of your "thank you" page:
CODE
<?php
$ToAddress = "lisa@dayanahost.com";
// To send it to more than one reception use
// coma (,) between addresses.
$message = "Message from web form\n";
$message .= "-------------------------------------------\n";
foreach ($_POST as $key => $value){$message .= "$key: $value\n";}
$message .= "-------------------------------------------\n";
mail("$ToAddress",
"Message from web",
"\r\n".$message,
"From: $ToAddress\r\nCc:\r\nBcc:\r\n\r\n");
?>
5. Make change to first line of the code with your email address. For example:
CODE
$ToAddress = "PUT_YOUR_EMAIL_ADDRESS_HERE";
to
CODE
$ToAddress = "lisa@dayanahost.com";
6. Now upload both pages to public_html folder of your account.
7. That's it and you are ready to go.
Note: You may change the name of these pages, Just make sure that action line of the contact form addressed to "thank you" page.
Lisa



