Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Problem with 'Thnak you' page

New Here ,
May 18, 2010 May 18, 2010

Copy link to clipboard

Copied

***Originaly posted in Dreamweaver by mistake***

Hi guys,

I'm new to web design but doing ok. However I have come across a problem I can't resolve.

I've created a form using PHP script for extraction and it's all working fine except for one aspect.

All the info is being gathered and sent to the mailbox but I cannot get the 'thank you' page to appear. I keep gettng an error 500 page insread.

Anyone got any solutions? The code is as follows:

<?php 

    $ToEmail = 'info@jenniescandles.net';
    $EmailSubject = 'Contact form ';
    $mailheader .= "From: ".$_POST["contactEmail"]."\r\n";
    $mailheader .= "Reply-To: ".$_POST["contactEmail"]."\r\n";
    $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $MESSAGE_BODY .= "Name: ".$_POST["contactName"]."<br>";
    $MESSAGE_BODY .= "Email address: ".$_POST["contactEmail"]."<br>";
    $MESSAGE_BODY .= "Telephone: ".$_POST["contactTelephone"]."<br>";
    $MESSAGE_BODY .= "Subject: ".$_POST["contactSubject"]."<br>";
    $MESSAGE_BODY .= "Message: ".nl2br($_POST["contactMessage"])."<br>";
   
    $sent = mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader);
    if($sent)
{header( "Location: http://www.jenniescandles.net/messagesent.html" );}
else
{print "We encountered an error sending your comment"; }
?>
TOPICS
Server side applications

Views

524
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 18, 2010 May 18, 2010

Copy link to clipboard

Copied

Why do you have a hidden field in your contact.html form with the redirection to the success page?. You should remove that one.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2010 May 18, 2010

Copy link to clipboard

Copied

LATEST

Thanks. Removed it but no difference. Still geting error 500.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines