hi
ive got a form but i cant get it to email it to me when the submit button is pressed, ive read the bit below but cant work out what it means !!
PLEASE HELP
2) Now create a new file using Notepad and call it: contact.php
So now you will have two pages one called
www.YourDomainName.com/contact.html and one called
www.YourDomainName.com/contact.php
Enter the following code into the file (replace order@example.com with your own email address):
<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your order!</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "order@example.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>
ive got a form but i cant get it to email it to me when the submit button is pressed, ive read the bit below but cant work out what it means !!
PLEASE HELP
2) Now create a new file using Notepad and call it: contact.php
So now you will have two pages one called
www.YourDomainName.com/contact.html and one called
www.YourDomainName.com/contact.php
Enter the following code into the file (replace order@example.com with your own email address):
<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your order!</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "order@example.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>
Comment