shuff
Jun 18th, 2008, 07:29 AM
I have the following PHP page that is the action response to another forms post:
<?php
$message = "Name: " . $_REQUEST['name'] . "\n" .
"Address: " . $_REQUEST['address'] . "\n" .
"City : " . $_REQUEST['city'] . "\n" .
"State : " . $_REQUEST['state'] . "\n" .
"Phone : " . $_REQUEST['phone'] . "\n" .
"Date: " . $_REQUEST['date'] . "\n" .
"Time: " . $_REQUEST['time'] . "\n" .
"Number of Attendees: " . $_REQUEST['people'];
mail("me@someplace.com", "Website Submission: Request A Party", $message, "From: webmaster@someplace.com");
header("Location: http://www.someplace.com/party/thankyou.html");
?>
At one time this code worked, but suddenly it gives this error:
Warning: Cannot modify header information - headers already sent by (output started at /webroot/s/o/someplace/www/party/submitparty.php:1) in /webroot/s/o/someplace/www/party/submitparty.php on line 11
The strange thing (to me at least) is that the email still gets sent.
I've read a bit on the web and made sure there is no empty line at the end of the file and even cut and paste it all into notepad and pack to see if there was any non-printable characters or something.
Can someone point me in the right direction? Thanks.
<?php
$message = "Name: " . $_REQUEST['name'] . "\n" .
"Address: " . $_REQUEST['address'] . "\n" .
"City : " . $_REQUEST['city'] . "\n" .
"State : " . $_REQUEST['state'] . "\n" .
"Phone : " . $_REQUEST['phone'] . "\n" .
"Date: " . $_REQUEST['date'] . "\n" .
"Time: " . $_REQUEST['time'] . "\n" .
"Number of Attendees: " . $_REQUEST['people'];
mail("me@someplace.com", "Website Submission: Request A Party", $message, "From: webmaster@someplace.com");
header("Location: http://www.someplace.com/party/thankyou.html");
?>
At one time this code worked, but suddenly it gives this error:
Warning: Cannot modify header information - headers already sent by (output started at /webroot/s/o/someplace/www/party/submitparty.php:1) in /webroot/s/o/someplace/www/party/submitparty.php on line 11
The strange thing (to me at least) is that the email still gets sent.
I've read a bit on the web and made sure there is no empty line at the end of the file and even cut and paste it all into notepad and pack to see if there was any non-printable characters or something.
Can someone point me in the right direction? Thanks.