You are here: Re: newbie: need help with "headers already sent" error « PHP Language « IT news, forums, messages
Re: newbie: need help with "headers already sent" error

Posted by Koncept on 01/12/07 07:20

In article <12qdd8p56ccv3b8@corp.supernews.com>, Hendri Kurniawan
<ask-me@email.com> wrote:

>
> Simply add exit() after your header statement to:
>
> <?php
> session_start();
> if ($_GET["mode"] == "logout") {
> header("Location: index.php");
> exit();
> }
> ?>
>
> Hendri Kurniawan

I agree with Hendri. This is "exit" what is missing from your code.
Make sure to always place exit() after redirection or use buffers.

--
Koncept <<
"The snake that cannot shed its skin perishes. So do the spirits who are
prevented from changing their opinions; they cease to be a spirit." -Nietzsche

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация