FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » buffering to allow headers in code?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
buffering to allow headers in code? [message #170163] Thu, 14 October 2010 13:39 Go to previous message
MikeB is currently offline  MikeB
Messages: 65
Registered: September 2010
Karma:
Member
I'm working through my class on PHP and I tried to put information from
my sign-on process in the navbar. This didn't work well, since I had to
reload the page to see it as the navbar was constructed earlier in the
code than the signon process. (Hard to explain, as we are building a
"dynamic" web page with lots of include files to fill in the main
content portion of the page.)

My instructor suggested that I do the reload of the page via php

header("Location: index.php");

after the sign-in. To do this, I have to turn on output buffering.

I recall struggling to turn off output buffering since someone here
recommended against it.

Any thoughts on this? Is this just a "quick and dirty" bypass for my
problem, accepted practice, a really bad idea, or customary practice?

I think I can code around this with some effort by putting a switch
statement in the header of the index.php, but that may be clumsy as
parts of the same web page will then be processed in two different areas.

What to do?

Thanks for any advice.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mesothelioma
Next Topic: Good code or bad code?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:37:57 GMT 2024

Total time taken to generate the page: 0.04328 seconds