Is there anyway for php to copy whatever is in the address bar to a variable or put the name of the current page in a variable?
I have a set of pages which require a login, I have a require command to insert the same login validation code I use for every page. If a user is not logged in the code forewards them to the login page. I would like to be able to once they login redirect them back to the page they were originally trying to reach.
I’m using cookies right now but I think I’m going to change it to sessions after what I’ve been reading. What I am looking for is some way to store the address typed into the address bar on the web browser to a session or cookie variable before I send them to the login page, then from the login page I can send them back to that address.