Hi everyone!
Here's what I'm trying to do.
I have an authentication page that matches a user's credentials to entries in a SQL database. If the login and password match, the user is taken to a "members-only" page.
Now, suppose a user bookmarks a page inside the "members-only" area. The way I have things set up now, the user is kicked back to the login page to sign in. What I would like to have happen, is that the user is taken back to the page he or she was trying to get to originally (the bookmarked page) once authenticated.
I'm not sure how to do this. Originally, I was thinking it would be possible to somehow store the page they were trying to get to in a session variable or something, and have them be redirected back to the correct page once they logged in.
I don't really understand how sessions work. My login page has a session_start() function, which would be called sometime between when the user tried going to the bookmarked page and when they were authenticated. Can you do something like session_start(some_name) and have a unique session to store the location of the page they had bookmarked, so it wouldn't be wiped out by the authentication session?
Any idea are GREATLY appreciated! Thank you!