Hello,
I have published my index page (www.slankadvies.com). On my index page is a contact form where readers can sign in on a newsletter. I want the mails to be delivered to my home email account. Everything seemed to be fine in the preview, but the form doesn’t send out the mail.
After reading the threads in the Form Forum, I did the following after seeing the two tutorials
Form name: contactform
Action: index.php
Method: POST
Encoding Type: multipart / form data
I named the fields name and email and submit
I saved and published the page as index.php in the page properties
I did include the following script in the inside body tag?
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "van.hoof.paul@telenet.be";
$mailsubj = "Nieuwsbrieven";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
I receive to following message:
Parse error: syntax error, unexpected T_VARIABLE
Questions:
What did I do wrong?
How can I fix this so the mail will be send to me?
Thanks for your help
I have published my index page (www.slankadvies.com). On my index page is a contact form where readers can sign in on a newsletter. I want the mails to be delivered to my home email account. Everything seemed to be fine in the preview, but the form doesn’t send out the mail.
After reading the threads in the Form Forum, I did the following after seeing the two tutorials
Form name: contactform
Action: index.php
Method: POST
Encoding Type: multipart / form data
I named the fields name and email and submit
I saved and published the page as index.php in the page properties
I did include the following script in the inside body tag?
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "van.hoof.paul@telenet.be";
$mailsubj = "Nieuwsbrieven";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
I receive to following message:
Parse error: syntax error, unexpected T_VARIABLE
Questions:
What did I do wrong?
How can I fix this so the mail will be send to me?
Thanks for your help
Comment