Jump to content

php script help


4dy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.