Jump to content

bmbc

Members
  • Posts

    21
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

bmbc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, yes I didn't think it through because I don't obviously write php so I have been using the same script for a long time but actually not for a few years since using cms, then coming back to it was a mistake. I think I will try swiftmailer on my linux server.
  2. I have used this same php contact form many times and never had this problem. I just checked it in online php code checker and comes up with no errors but when uploaded to the site and I got to test the form it goes to mysite.com/contact.php stuck on trailing code \nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.03" ); header( "Location: $thankyouurl" ); exit ; ?> It has me stumped I can't work it out. The full code is: <? /* CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.03 */ $mailto = '[email protected]' ; $subject = "Contact Form" ; $formurl = "http://www.mysite.com/contact.html" ; $errorurl = "http://www.mysite.com/error.html" ; $thankyouurl = "http://www.mysite.com/thanks.html" ; $name = $_POST['name'] ; $email = $_POST['email'] ; $comments = $_POST['comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (empty($name) || empty($email) || empty($comments)) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.03" ); header( "Location: $thankyouurl" ); exit ; ?> But when I look at the source code in browser I can see all of it is in red except for the last trailing bit which appears in black .
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.