Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Greg Scharlemann
November 11, 2005, 8:12 pm
rate this thread
need to come before certain statements?
I've setup a login page and try to redirect a user once they have
logged in (after I set the appropriate $_SESSION value) but I get the
Warning: Cannot modify header information - headers already sent by
If I comment out the header everything works, I just don't get back to
the page I was on when I log in.
Re: php redirect: Warning: Cannot modify header information
Have you *tried* Google?
This is a FAQ.
There is something -- whitespace, probably -- being printed to the browser
before the header() line(s).
header() must be the VERY FIRST thing sent to the browser. (which is not
the same as the first thing in the PHP script).
JDS | firstname.lastname@example.org
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
- — Previous thread in » PHP Scripting Forum