PDA

View Full Version : Form Problem?



Pixel
03-20-2006, 06:51 PM
I am still having problems with my booking form, I have uploaded the script for it, if I leave the mailto email address in the form it just wants to send it by standard email, if I deleat this it just says cannot find page?? H>E>L>P .

navaldesign
03-20-2006, 07:16 PM
Please read Basics about Forms (http://www.vodahost.com/vodatalk/bluevoda-tips-tricks-shortcuts/4363-basics-about-forms.html) the answer on why it tries to send it by email is there. The solution also.

then if you need help post again.

Pixel
03-21-2006, 05:36 PM
Hi Navaldesign, I am Still non the wiser?? Below is the script I have uploaded. What Have I done Wrong??
HTML>
<HEAD>
<TITLE>Succesfully processed your booking</TITLE>
<style type="text/css">
<!--
.style1 {
color: #990000;
font-weight: bold;
}
-->
</style>
</HEAD>
<BODY>
<h1 class="style1">Thank you for your booking!</h1>
<p class="style1"><img src="../photos/DSCF0615%20(718%20x%20246).jpg" width="718" height="246"> </p>
<h1 class="style1">We will be in touch soon. </h1>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "ifo@flynnphotography.co.uk";
$mailsubj = "BOOKING";
$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>

navaldesign
03-21-2006, 05:48 PM
Hold on 5 mins. I'll come back with full instructions

navaldesign
03-21-2006, 05:56 PM
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "youremail address (gary@-e-advertz.com)";
$mailsubj = "New Order";
$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);
header("Location: http://www.yourdomain.com/thankyou_page.html (http://www.yourdomain.com/thankyou_page.html)");
?>

Copy this code, paste it in Notepad. Go to "Save as" , choose for "File type" "All files" and save it with the same name that you used till now, f.e. "feedback.php". Upload it on your site using Blue FTP. For the thankyou page, create and publish a normal BV page, save it as "thankyou_page" and publish it. You're done.

navaldesign
03-21-2006, 05:59 PM
Of course you can change the subject "New Order" to be as you like it, and you can also change the first line of the body, from "Values submitted....." in whatever you want. Change your email and the "yourdomain.com". Please also note that the email field in your form must be named "email". Upload the URL of your form so i can have a look. Please also note that you have probably mistaken your email address : shouldn't that be info ? because in the script you have "ifo". Maybe that was all your problem. Also try, if it doesn't work, to set the encoding type to "multipart/form data"

Pixel
03-21-2006, 09:12 PM
Thank you sooooo much! Naveldesign you have cured my headache.
You should be on the payroll? with the amount of help you give everyone freely. It is much appreciated. PIXEL