For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > April 2007 > RE: [PHP-WIN] Warning: Cannot modify header information









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-WIN] Warning: Cannot modify header information
George Pitcher

2007-04-08, 7:58 am

Sam,

> I have to different pages (forms) one.php and two.php I created
> two different pages (onemysql.php and twomysql.php) to handle
> myql data for each of them I add header("Location: one.php");
> to onemysql.php
> And header("Location: two.php"); to twomysql.php
> one.php works fine. two.php give me this Warning: Warning:
> Cannot modify header information - headers already sent by
> (output started at C:\Program
> Files\xampp\htdocs\xampp\Activity_Log\ht
ml\twomysql.php:1) in
> C:\Program
> Files\xampp\htdocs\xampp\Activity_Log\ht
ml\twomysql.php on line 3
>

You should search the archives before posting. This is one of the most
common queries. You probably have an echo statement or a blank line bofeore
your header() command. Remove or comment out and it should work.

George
sam rumaizan

2007-04-08, 7:58 am

Thank you George,
it works fine. as you said. there was a blank line bofeore <?php
George Pitcher <george.pitcher@ingenta.com> wrote:
Sam,

> I have to different pages (forms) one.php and two.php I created
> two different pages (onemysql.php and twomysql.php) to handle
> myql data for each of them I add header("Location: one.php");
> to onemysql.php
> And header("Location: two.php"); to twomysql.php
> one.php works fine. two.php give me this Warning: Warning:
> Cannot modify header information - headers already sent by
> (output started at C:\Program
> Files\xampp\htdocs\xampp\Activity_Log\ht
ml\twomysql.php:1) in
> C:\Program
> Files\xampp\htdocs\xampp\Activity_Log\ht
ml\twomysql.php on line 3
>

You should search the archives before posting. This is one of the most
common queries. You probably have an echo statement or a blank line bofeore
your header() command. Remove or comment out and it should work.

George

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com