takn25 Posted February 4, 2011 Share Posted February 4, 2011 Hi, what i am after is for instance, the user is viewing my website. He is in a different section on my website and there is a sign in button. The user goes to the sign in page, now what i want is when the user logs in, the user to be redirected back to the section which he was viewing before signing in. Basically in more clear words, I want the user to return to the content he was viewing after logging in. Link to comment https://forums.phpfreaks.com/topic/226702-could-some-one-tell-me-how-can-i-achieve-this-type-of-redirection/ Share on other sites More sharing options...
drisate Posted February 4, 2011 Share Posted February 4, 2011 You can do that using cookies or session. You store in there $_SERVER[php_SELF] and $_SERVER[QUERRY_STRING] Then you can use header("location:$_SESSION[path]") or even the meta refresh code. Link to comment https://forums.phpfreaks.com/topic/226702-could-some-one-tell-me-how-can-i-achieve-this-type-of-redirection/#findComment-1169948 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.