I'm 95% complete on a project. That last 5% always takes up a lot of time.
I'm working with PHP/MySQL.
I'm retrieving a URL to display from MySQL upon a valid login. Each user; different URL.
In the script that checks for valid user, at the bottom of it, I've got include($WebPage); where $WebPage is defined as the URL to go to. (Debug echo shows its there etc.)
I can't use "Location: " redirect because I've already output to headers to the browser.
In initial testing it did everything I wanted it to. (I was just playing around displaying "non-sessioned" URL's. So, Cnn.com does exactly like I want it to. Without user intervention, display stuff at the top then display the page. )
I temporarily got around it by just making a link. Click here to load your page and that works perfectly. But client would like his clients to see the page without intervention.
I feel its the fact that I'm registering my variables in the same page that I'm requesting the "new" page. I know through debug code that the "You are not logged in" message is coming from the page I'm loading and I only have a problem that "first" time; each new login.
Any ideas or confirmation that I'm right in why it's not working?
p.s. For now, I re-designed to use the Location: directive. Works fine. Particularly in "debug output" though, I'd like to know if I can do it with includes and not have to worry about it being the first output to browser.