alisacki
11-09-2007, 12:26 AM
I have a formail php script, and need it to redirect to: www.gowoburn.com/join/1 . I have tried the hidden value redirect option, as you can see below, but when I click submit, it e-mails the form, but the url of the redirect page it goes to is the .php formail file itself. Any ideas on what I am doing wrong?
<INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.gowoburn.com/join/1/">
<?php
$name=addslashes($_POST['name']);
$email=addslashes($_POST['email']);
$BusinessName=addslashes($_POST['BusinessName']);
$Address=addslashes($_POST['Address']);
$City=addslashes($_POST['City']);
$Phone=addslashes($_POST['Phone']);
$Fax=addslashes($_POST['Fax']);
$Logo=addslashes($_POST['Logo']);
$sun=addslashes($_POST['sun']);
$mon=addslashes($_POST['mon']);
$tues=addslashes($_POST['tues']);
$wed=addslashes($_POST['wed']);
$thur=addslashes($_POST['thur']);
$fri=addslashes($_POST['fri']);
$sat=addslashes($_POST['sat']);
$NoHours=addslashes($_POST['NoHours']);
$aboutus=addslashes($_POST['aboutus']);
$NoAbout=addslashes($_POST['NoAbout']);
$products=addslashes($_POST['products']);
$NoProducts=addslashes($_POST['NoProducts']);
$coupons=addslashes($_POST['coupons']);
$NoCoupons=addslashes($_POST['NoCoupons']);
$comments=addslashes($_POST['comments']);
$redirect=addslashes($_POST['redirect']);
// you can specify which email you want your contact form to be emailed to here
$toemail = "info@gowoburn.com";
$subject = "Business Registration - 1 YEAR";
$headers = "MIME-Version: 1.0\n"
."From: \"".$name."\" <".$email.">\n"
."Content-type: text/html; charset=iso-8859-1\n";
$body = "Business Name: ".$BusinessName."<br>\n"
."Contact Name: ".$name."<br>\n"
."Address: ".$Address."<br>\n"
."City: ".$City."<br>\n"
."Phone: ".$Phone."<br>\n"
."Fax: ".$Fax."<br>\n"
."Email: ".$email."<br>\n"
."Logo Source: ".$Logo."<br>\n"
."Sunday: ".$sun."<br>\n"
."Monday: ".$mon."<br>\n"
."Tuesday: ".$tues."<br>\n"
."Wednesday: ".$wed."<br>\n"
."Thursday: ".$thur."<br>\n"
."Friday: ".$fri."<br>\n"
."Saturday: ".$sat."<br>\n"
."Do Not Include Hours: ".$NoHours."<br>\n"
."About Our Company: ".$aboutus."<br>\n"
."Do Not Include About Us: ".$NoAbout."<br>\n"
."Products: ".$products."<br>\n"
."Do Not Include Products: ".$NoProducts."<br>\n"
."Coupons: ".$coupons."<br>\n"
."Do Not Include Coupons: ".$NoCoupons."<br>\n"
."Additional Comments: ".$comments;
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
{
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
}
?>
Thanks
<INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.gowoburn.com/join/1/">
<?php
$name=addslashes($_POST['name']);
$email=addslashes($_POST['email']);
$BusinessName=addslashes($_POST['BusinessName']);
$Address=addslashes($_POST['Address']);
$City=addslashes($_POST['City']);
$Phone=addslashes($_POST['Phone']);
$Fax=addslashes($_POST['Fax']);
$Logo=addslashes($_POST['Logo']);
$sun=addslashes($_POST['sun']);
$mon=addslashes($_POST['mon']);
$tues=addslashes($_POST['tues']);
$wed=addslashes($_POST['wed']);
$thur=addslashes($_POST['thur']);
$fri=addslashes($_POST['fri']);
$sat=addslashes($_POST['sat']);
$NoHours=addslashes($_POST['NoHours']);
$aboutus=addslashes($_POST['aboutus']);
$NoAbout=addslashes($_POST['NoAbout']);
$products=addslashes($_POST['products']);
$NoProducts=addslashes($_POST['NoProducts']);
$coupons=addslashes($_POST['coupons']);
$NoCoupons=addslashes($_POST['NoCoupons']);
$comments=addslashes($_POST['comments']);
$redirect=addslashes($_POST['redirect']);
// you can specify which email you want your contact form to be emailed to here
$toemail = "info@gowoburn.com";
$subject = "Business Registration - 1 YEAR";
$headers = "MIME-Version: 1.0\n"
."From: \"".$name."\" <".$email.">\n"
."Content-type: text/html; charset=iso-8859-1\n";
$body = "Business Name: ".$BusinessName."<br>\n"
."Contact Name: ".$name."<br>\n"
."Address: ".$Address."<br>\n"
."City: ".$City."<br>\n"
."Phone: ".$Phone."<br>\n"
."Fax: ".$Fax."<br>\n"
."Email: ".$email."<br>\n"
."Logo Source: ".$Logo."<br>\n"
."Sunday: ".$sun."<br>\n"
."Monday: ".$mon."<br>\n"
."Tuesday: ".$tues."<br>\n"
."Wednesday: ".$wed."<br>\n"
."Thursday: ".$thur."<br>\n"
."Friday: ".$fri."<br>\n"
."Saturday: ".$sat."<br>\n"
."Do Not Include Hours: ".$NoHours."<br>\n"
."About Our Company: ".$aboutus."<br>\n"
."Do Not Include About Us: ".$NoAbout."<br>\n"
."Products: ".$products."<br>\n"
."Do Not Include Products: ".$NoProducts."<br>\n"
."Coupons: ".$coupons."<br>\n"
."Do Not Include Coupons: ".$NoCoupons."<br>\n"
."Additional Comments: ".$comments;
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
{
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
}
?>
Thanks