twilitegxa Posted September 25, 2008 Share Posted September 25, 2008 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? Link to comment https://forums.phpfreaks.com/topic/125723-redirecting-to-previous-page-after-logging-in/ Share on other sites More sharing options...
pocobueno1388 Posted September 25, 2008 Share Posted September 25, 2008 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. Link to comment https://forums.phpfreaks.com/topic/125723-redirecting-to-previous-page-after-logging-in/#findComment-650093 Share on other sites More sharing options...
NoSalt Posted September 25, 2008 Share Posted September 25, 2008 sorry ... posted in the wrong post. Link to comment https://forums.phpfreaks.com/topic/125723-redirecting-to-previous-page-after-logging-in/#findComment-650128 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.