Forum Moderators: coopster
I've made my first attempt at a php-based form at work in order to personalize the form response with the submitter's name; I'm desperate to have this working by morning. When I submit the form, all that's returned to me is a blank page. I've been searching Google but can't figure out what I've done wrong or what I'm not understanding about processing and e-mailing form information. The php to process the form is this:
<?php
mail("me@mydomain.com","Subject of Form","$message","From: $name <$email>");
foreach($HTTP_POST_VARS as $key => $value)
{
$message .= $key . ": " . $value;
$message .= "\n";
}
echo "Thank you for your submission, $name.<br>
<p>Sincerely,<br>
Company Name</p>"
?>
</body>
</html>
Is my problem with the $HTTP_POST_VARS section; have I misunderstood what that can do (read the inputs from the form)?
The form on the html page is generally configured as such, and there are about 20 input values:
<td colspan="2" align="left" valign="bottom">Your
Name<br>
<input name="name" type="text" id="name" size="60"> <br>
</td>
<td width="50%"> </td>
I appreciate any help or insight to solve this problem...
Thank you...
PS In case it makes any difference, my host adds this to outgoing messages:
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - xxx.hostdomain.net
X-AntiAbuse: Original Domain - domain.net
X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [99 99]
X-AntiAbuse: Sender Address Domain - xxx.hostdomain.net