I have honestly read the tutorials at least three times each for forms. Building it is quite easy. But processing it to mail to your email is a different story.
I am confused about the property page of the form. Where it asks for Name and Value: What exactly goes there?
I have the form on my Contacs page and I uploaded a page: Contacts.php to the public_html folder.
The form properties I have listed are; Acton: Contacts.php - Method: Post - Encoding: Field Empty (as instructed by tutorial.)
But clicking submit just takes me to a "Page Not Found" message.
Is there somewhere else the script is to be embedded?
I've included the script I am using. I simply copied it from one of the tutorials and edited it for my site. It only has three values: Name, email and Comments.
It's the last element I need for this very basic site.
Appreciate any help.
apublicsecret.com (first site)
mhknuckles@apublicsecret.com
<HTML>
<HEAD>
<TITLE>Guests and Comments</TITLE>
</HEAD>
<BODY>
<H1>Thank you, yah.</H1>
<?PHP
$name = $HTTP_POST_VARS['name'];
$email = $HTTP_POST_VARS['email'];
$comments = $HTTP_POST_VARS['comments'];
$mailto = "mhknuckles@apublicsecret.com";
$mailsubj = "email";
$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>
I am confused about the property page of the form. Where it asks for Name and Value: What exactly goes there?
I have the form on my Contacs page and I uploaded a page: Contacts.php to the public_html folder.
The form properties I have listed are; Acton: Contacts.php - Method: Post - Encoding: Field Empty (as instructed by tutorial.)
But clicking submit just takes me to a "Page Not Found" message.
Is there somewhere else the script is to be embedded?
I've included the script I am using. I simply copied it from one of the tutorials and edited it for my site. It only has three values: Name, email and Comments.
It's the last element I need for this very basic site.
Appreciate any help.
apublicsecret.com (first site)
mhknuckles@apublicsecret.com
<HTML>
<HEAD>
<TITLE>Guests and Comments</TITLE>
</HEAD>
<BODY>
<H1>Thank you, yah.</H1>
<?PHP
$name = $HTTP_POST_VARS['name'];
$email = $HTTP_POST_VARS['email'];
$comments = $HTTP_POST_VARS['comments'];
$mailto = "mhknuckles@apublicsecret.com";
$mailsubj = "email";
$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