justin wrote:
On Wed, Apr 23, 2008 at 10:53 PM, michael geary <[EMAIL PROTECTED]> wrote:
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
michael's absolutely right. every once in a while i run into trouble
with redirects not working, and usually it's because something leaked
into output before i sent the header... usually it's an extra space
after the closing php tag of an included file or something. so watch
out for those too :)
Also be aware that you might have redirect issues with the browser. I know that
firefox has a redirect limit config option that is set to 20. So you might want
to watch the total amount of redirects sent to a browser. Also know that
redirects cause the user to request a new url. I find that outputting the
desired code might be another alternative to the redirect. In OO design this
could be accomplished with an include of your login form for the page. then you
can do a simple post back to the page and catch the login and then display the
page if needs be.
--
ray
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net