PDA

View Full Version : Totally frustrated with email forms



Tristan
11-10-2005, 07:37 PM
Can anyone help me with my form? You can see it at www.re-flections.co.uk/contact.html (http://www.re-flections.co.uk/contact.html). When you submit the form it just gives me the option to send an email. I've read that PHP script is better than mailto, but I have no idea how to make a script. I've tried the suggestions on the tutorial, but it's not worked. How can I configure this form, so that it will send me the details? Please help me!

VodaHost
11-11-2005, 08:26 AM
Email forms are very easy. Please....

1) Read this >>> http://www.vodahost.com/vodatalk/showthread.php?t=246
2) Watch the two form tutorials again. I know you have watched them...Wtach them again!
3) Try again, and if you fail again,,,try again.


--------------------------------------------------

Your thank you page is called

http://www.re-flections.co.uk/POST This is wrong!!!

it should be called....

http://www.re-flections.co.uk/contact.php

the HTML page the the form is on should have the same name as the PHP page.

Lets see the PHP code you are using. Post it here.

*****

Tristan
11-11-2005, 05:44 PM
Email forms are not easy for me. They give me headaches. Even after watching the videos I still can't do them. Can you see anything wrong with this script?



<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks we will contact you shortly</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = info@re-flections.co.uk;
$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>
</HEAD>

Tristan
11-12-2005, 01:38 AM
I've done it and I can't believe it! After days of trying I've managed to do it. Thanks so much for your help. It was just pure carelessness on my part. I re-read the php script and it dawned on me that I had left some information out. Thanks for your suggestions.