DeanWhitehouse Posted June 24, 2008 Share Posted June 24, 2008 ok, so now this is the correct code <? $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message=$_POST['message']; $send = $_POST['Send']; if ($send == "Yes") { //Mail the comment /* Specify your SMTP Server, Port and Valid From Address */ ini_set("SMTP","mail.marklemmons.com"); ini_set("smtp_port","25"); ini_set("sendmail_from", "[email protected]"); //Specify where you want them email to be sent $to = '[email protected]'; $message = "Name: ".$name."\n Email: ".$email."\n Subject:".$subject."\n Message: ".$message; $headers = 'From: '.$email. "\r\n" . 'Reply-To: '.$email. "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); if($_SERVER['HTTP_HOST'] == "www.marklemmons.com"); { //code here header("Location: http://www.marklemmomns.com"); } if($_SERVER['HTTP_HOST'] == "www.mobile.marklemmons.com"); { //code here header("Location: http://mobile.marklemmons.com"); } ?> Link to comment https://forums.phpfreaks.com/topic/111696-contact-form-redirect-to-seperate-sites/page/2/#findComment-573586 Share on other sites More sharing options...
cow1787 Posted June 24, 2008 Author Share Posted June 24, 2008 Parse error: syntax error, unexpected $end in /home/markl7/public_html/process.php on line 36 line 36 is the ?> at the end... Link to comment https://forums.phpfreaks.com/topic/111696-contact-form-redirect-to-seperate-sites/page/2/#findComment-573589 Share on other sites More sharing options...
DeanWhitehouse Posted June 24, 2008 Share Posted June 24, 2008 ahh yer soz, forgot one add this } before ?> Link to comment https://forums.phpfreaks.com/topic/111696-contact-form-redirect-to-seperate-sites/page/2/#findComment-573591 Share on other sites More sharing options...
cow1787 Posted June 24, 2008 Author Share Posted June 24, 2008 Well it works, thanks so much for that! But both sites send me to the mobile homepage. Link to comment https://forums.phpfreaks.com/topic/111696-contact-form-redirect-to-seperate-sites/page/2/#findComment-573592 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.