PDA

View Full Version : Basic Form Problem



Chrisgf
07-20-2007, 01:58 PM
Hi

I'm having some problems getting the basic form I have set up to send emails to me. I have followed the lesson and think I have done everything correctly, but still don't get an email back.

I have read the other messages and it hasn't helped.

This is the php part of the html in the action.php page

<?PHP
$mailto = "chrisgf@clear.net.nz";
$email = $HTTP_POST_VARS['email'];
if ($email == "")
{
$email = $mailto;
}
$mailsubj = "Contact Form Submission";
$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);
?>

The link to the page to enter the contact details is

http://www.maxltk.com/contact.html

I have not bothered formation it to look good yet as I am trying to get the form to send the emails to me first.

Please let me know if there is any other info you need.

My account id is 15801.

Thanks

Chris

Andy128
07-20-2007, 07:47 PM
Chris,
The form is ok as is the code and the action.php page. I suspect that it may be a problem with the email provider itself.

Could you try to set up a email account in the cpanel of your VH account and have the form send the contents there? In this we can see if indeed it is being blocked or other wise not sent/picked up by your email provider (clear.net.nz)


Andy

Chrisgf
07-20-2007, 10:14 PM
Thanks Andy,

I set up a test mail account and changes the php with the new email address and tested it. It worked great.

Many thanks for the help. It looked like my other email account was getting blocked.

Regards

Chriss

Andy128
07-21-2007, 05:50 AM
Any time.

Andy