Jump to content

Redirecting to previous page after logging in


twilitegxa

Recommended Posts

How can I write the script that would detect what page the person was on before they logged in and have them redireced back to it after they have logged in? Sometimes they may click the log in link from different pages, and I would like it to redirect them back rather than to a set page. How can I do this?

When they visit a page they have to be logged in to view, store the URL of the page they were trying to visit into a session. Then when they log in, just redirect them to whatever page the session has in it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.