PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have been working on my website and after updating the login i started to get some really maddening responses.
Now when i log in it logs in and sets the SESSION variables but when it gets to the header("Location: " . $HTTP_REFERER); it brings up a 404 page not found ... heres the code... it seems to bring up the error on a couple of pages...
it's worked so far... and what globals? the session vars? i just save the username, cart and a validation number... is there something wrong with that?
Zoram wrote:it's worked so far... and what globals? the session vars? i just save the username, cart and a validation number... is there something wrong with that?
Actually, as i am testing it out more if i log in from different pages half of the time it works and the other half when i try to redirect it gives me the 404 error.
'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
And as gyardleydn pointed out, if register_globals are off it should be $_SERVER['HTTP_REFERER'] instead of $HTTP_REFERER.