a header() redirect must be called before anything is *output* to the
browser. If you have output_buffering turned on, this is relaxed for
the most part, but there are good reasons to avoid that sloppiness and
separate your app and display logics such that you can do a header()
redirect any time in your app logic, which is finished before your
display logic is reached. Just make sure you do an "exit" after a
header redirect, or the rest of the code on that page WILL be executed
before the redirect happens.
-michael
On Apr 23, 2008, at 9:10 PM, Nathan Lane wrote:
Thank you for clarifying that - every "PHP redirect" tutorial I
found by
googling seemed to say that the header() function for redirecting
had to be
the first line of PHP code. That was frustrating, and since I didn't
know
any better, well that's why I came here, where I knew I could get an
answer
:)
Nathan
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net