Hello,
I'm trying to figure out a good way that when a user tries to access a protected page, when he's re-reouted to the login page, once logged in it takes him back to where he was trying to get to.
Right now, using mySQL and sessions, only registered sessions are allowed to access pages. If a user tries to just type it in, he goes back to the home page and once logging in, it just takes him to the front page. I want him to redirect back to the place that sent him to my login page ONLY if my website sent him there.
Any ideas?