Well I`m very nearly there, i can get the form filled in and when I press the submit button it sends the filled out form in text to my email. Fantastic.
But,
I have one problem left, when the submit button is pressed and posts, it then diverts to this page
http://www.mywebsite/inquiry.php which is blank.
I can not seem to divert it to the thanks or error page to come up after submission.
below is my form page - very basic at the mo just the form and the php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form" method="POST" action="inquiry.php">
<!--webbot bot="SaveResults" u-file="inquiry" s-format="HTML/BR" s-label-fields="TRUE" b-reverse-chronology="FALSE" s-email-format="TEXT/PRE" s-email-address="
myemail@lycos.co.uk" b-email-label-fields="TRUE" s-builtin-fields u-confirmation-url="thanks.html" u-validation-error-url="error.html" --><TABLE cellSpacing=0 cellPadding=0 width=495 align=center bgColor=#cccccc
border=0>
<TBODY>
<TR>
<TD width=493>
<TABLE cellSpacing=1 cellPadding=3 width=485 align=center
border=0><TBODY>
<TR bgColor=#ffffff>
<TD width=388 colSpan=2><B><FONT face=Verdana size=2>Please
fill out the form below to e-mail us</FONT></B></TD></TR>
<TR bgColor=#ffffff>
<TD align=left width=124><FONT face=Verdana size=2><FONT
color=#ff0000>*</FONT>Your name: </FONT></TD>
<TD align=left width=339><FONT face=Verdana size=2>
<!--webbot bot="Validation" s-display-name="Please Enter Your Full Name" b-value-required="TRUE" --><INPUT id=name size=47 name=name>
</FONT></TD></TR>
<TR bgColor=#ffffff>
<TD align=left width=124><FONT face=Verdana size=2><FONT
color=#ff0000>*</FONT>Your email: </FONT></TD>
<TD align=left width=339><FONT face=Verdana size=2>
<!--webbot bot="Validation" s-display-name="Please enter an e-mail address" b-value-required="TRUE" --><INPUT id=email
size=47 name=email> </FONT></TD></TR>
<TR bgColor=#ffffff>
<TD align=left width=124><FONT face=Verdana size=2>Your
Tel:</FONT></TD>
<TD align=left width=339><FONT face=Verdana size=2><INPUT
id=email0 size=47 name=Telephone_number> </FONT></TD></TR>
<TR bgColor=#ffffff>
<TD align=left width=124><FONT face=Verdana size=2>Enquiry
type?:</FONT></TD>
<TD align=left width=339><FONT
face="Verdana, Arial, Helvetica, sans-serif" size=2><SELECT
id=subject size=1 name=subject> <OPTION
value="Choose Option..." selected>Choose Option...</OPTION>
<OPTION>Bouncy Castles</OPTION> <OPTION>Feedback</OPTION>
<OPTION>Other</OPTION></SELECT> </FONT></TD></TR>
<TR bgColor=#ffffff>
<TD align=left width=124><FONT face=Verdana size=2>Your
message:</FONT></TD>
<TD align=left width=339><FONT face=Verdana size=2><TEXTAREA id=message name=message rows=6 cols=40></TEXTAREA>
</FONT></TD></TR>
<TR bgColor=#ffffff>
<TD align=middle width=388 colSpan=2><FONT face=Verdana
size=2><INPUT type=submit value=Submit name=Submit></FONT>
<P align=left><FONT face=Verdana size=2><FONT
color=#ff0000>*</FONT> indicates required
info </FONT></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></P></TD></TR>
</body>
</html>
and the php
<?php
# PHP Basic Form Mailer by Kalinga Athulathmudali
# mail.php
# 2006-Feb-23
## Global Setings ##
# Error page (if some one fail to fill the forum)
$eurl = "error.html";
# Send Successfully Page (Confirm page that will get directed after the email was send)
$furl = "thanks.html";
# Mail Subject
$subject = "inquiry";
####################
$email = $_POST['email'];
if ($email) {
foreach ($_POST as $key => $val){
$msg = "$msg \n $key : $val ";
}
# Change the email address (
admin@domain.com) to
# where you want your mail to be send.
mail("
myemail@lycos.co.uk", "$subject", "$msg",
"From: <$email>\n"
. "X-Mailer: PHP Mailer\n"
. "Content-Type: text/html; \n charset=iso-8859-1 \n");
header ("Location: $furl");
}
else {
header ("Location: $eurl");
die();
}
?>
I am so close, but just a step away, would be greatful for your time and help.
Regards Elektron