4dy Posted February 2, 2007 Share Posted February 2, 2007 this is my code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <? /* this part can either be in the same file as the form or it can be in a different file. If you want this in a different file, make the "action" of the form go to that file */ if(sizeof($_POST)) { $body = ""; while(list($key, $val) = each($HTTP_POST_VARS)) { $body .= "$key: $val \n"; } mail("[email protected]", // to "Internet Enquiry", $body); header('location:contact.html'); <--! this is line 28 --!> die('Error occurred if you can see this…'); } for some reason the email sends but the following message comes up Warning: Cannot modify header information - headers already sent by (output started at /home/sites/plastickwindows.co.uk/public_html/mail_script.php:2) in /home/sites/plastickwindows.co.uk/public_html/mail_script.php on line 28 Error occurred if you can see this… Link to comment https://forums.phpfreaks.com/topic/36751-php-script-help/ Share on other sites More sharing options...
Daney11 Posted February 2, 2007 Share Posted February 2, 2007 Hi mate. Please read this... http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Link to comment https://forums.phpfreaks.com/topic/36751-php-script-help/#findComment-175276 Share on other sites More sharing options...
suzzane2020 Posted February 2, 2007 Share Posted February 2, 2007 headers and sesions are normally kept before an html code..if not u wud get the error Link to comment https://forums.phpfreaks.com/topic/36751-php-script-help/#findComment-175277 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.