You are here: Re: Reload (refresh) page within an if statement « PHP Programming Language « IT news, forums, messages
Re: Reload (refresh) page within an if statement

Posted by Buddy on 11/29/06 14:03

You most definitely cannot use Header once you have output something to
the screen. I have had to battle that one a few times. It all depends
on where the php code is put in your page. If it has to be after
something is output (<body> tag) why not use JavaScript? If before
<body> use <meta>.

Christoph Burschka wrote:
> ED wrote:
> > "Christoph Burschka" <christoph.burschka@rwth-aachen.de> wrote in message
> > news:4t2u5rF126odiU1@mid.dfncis.de...
> >> You can't send a Location header after sending cookies (which
> >> session_start() does).
> >>
> >> So you either need to find a way to reload without starting a session, or
> >> you need to print a <meta> refresh tag into the page to reload it...
> >
> > Um, you sure about that?
> > The code below works fine here:
> >
> [...]
> >
>
>
> Then I remember it wrong...
>
> Oh, right: What you can't send after a cookie is the HTTP response code - such
> as "HTTP/1.1 303 See Other". The status code apparently has to be the first
> header sent, while the Location header can follow after the cookies just fine.
>
> I've never used a Location header without explicitly setting a 3xx response yet,
> so that's the reason for the mix-up.
>
> --
> Christoph Burschka

 

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

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