How can I recognize that header() has opened actual page?
Posted: Tue Apr 18, 2006 11:36 pm
I have a login page which calls the header('Location: SOMEPAGE.php') function if the login was correct.
My question is, how can i recognise that SOMEPAGE.php has been
opened with the header function and not with any other button, link or POST method?
The code needs this information in order to recognize if the page is loaded for the first time or not (first time is on call header).
I was thinking about to save this information in the session variables but I don't think this would be an optimal solution.
Any other proposition is welcome.
I am serching something (if it exists) like the condition $_SERVER['REQUEST_METHOD']=='POST' for $_POST variables.
My question is, how can i recognise that SOMEPAGE.php has been
opened with the header function and not with any other button, link or POST method?
The code needs this information in order to recognize if the page is loaded for the first time or not (first time is on call header).
I was thinking about to save this information in the session variables but I don't think this would be an optimal solution.
Any other proposition is welcome.
I am serching something (if it exists) like the condition $_SERVER['REQUEST_METHOD']=='POST' for $_POST variables.