Your code does not make sense (to me anyway). It flags an error because you are sending HTML before the header command. Don't bother looking for whitespace etc...the <html><head><title> etc is more than enough to produce this error.
Using "Location" redirects to another URL. It does not make sense to redirect in the middle of a page. I think instead of header, you meant to use "include" or "require" (same thing.) Is your intention to "include" the file "advertise2.php" in the body section? If so, get rid of the header line, and use this : <?php include("..path..to../advertise2.php"); ?> Good luck with it! ----- Original Message ----- From: Ernie Kemp To: firstname.lastname@example.org Sent: Saturday, September 19, 2009 2:39 AM Subject: [PHP] PHP Header issue <html> <head> <title>Contact Us</title> </head> <body> <?php header("Location: advertise2.php"); ?> </body> </html> The above is just snippet of the code but even this simple example throws the Header Warning / Error. Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/t/a /html/yourestate/advertise.php:6) in/home/content/g/t/a /html/yourestate/advertise.php on line 6 The anwser may be simple but I have looked a blanks or spaces around the <?php ?> with no success. Ready need your help. Thanks, Ernie Kemp Phone: 416 577 5565 Email: ek...@digitalbiz4u.com ...man will occasionally stumble over the truth, but usually manages to pick himself up, walk over or around it, and carry on. Winston S. Churchill