I have been using a php script to read the values entered into a html form and send them to the website owner via email. The script is as follows (the last 5 lines are the important ones):


$body = "";

// retrieve the current date
$current_date= date("F j, Y" );

$body = $body . "The following message was sent on " . "$current_date\n\n";

$body = $body . "Photograph Title : " . $HTTP_POST_VARS["title"]."\n" .
"Email Address : " . $HTTP_POST_VARS["email"]."\n" .
"Photograph Only : " . $HTTP_POST_VARS["PhotoOnly"]."\n".
"Matt Colour : " . $HTTP_POST_VARS["border"]."\n".
"Framing Choices : " . $HTTP_POST_VARS["frame"]."\n".
"Comments : \n".

// Email the form details

"Website feedback",
"From: purchase@nalderphotographics.com" );
header("Location: thanks.htm" );

You will notice that the last line sends the user to a thankyou page.

This method has been working fine for at least a year. However, I have noticed that the latest Internet explorer browsers give the following error messages and do not send the user to the thankyou page:

Warning: Failed to Connect in d:\webspace\nalderph\purchase\mailform.php on
line 31

Warning: Cannot add header information - headers already sent by (output
started at d:\webspace\nalderph\purchase\mailform.php:31) in
d:\webspace\nalderph\purchase\mailform.php on line 32

I would appreciate it if someone could tell me what the problem is or suggest some alternative code.