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 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.