localhost Posted July 16, 2006 Share Posted July 16, 2006 Say someone wants to post a reply on my forum, the link would be reply.php?id=57, they need to login first, so it points them to the login. At the end of the login script it redirects them to index.php using window.location. How would I get it so after they login it takes them to reply.php?id=57.Thanks for any help given. Quote Link to comment https://forums.phpfreaks.com/topic/14737-question-holding-temporary-links/ Share on other sites More sharing options...
hvle Posted July 16, 2006 Share Posted July 16, 2006 you can use session to maintains the last access page, or referer link.then after login, redirect user to that link.read manual about $_SERVER['referrer'], session Quote Link to comment https://forums.phpfreaks.com/topic/14737-question-holding-temporary-links/#findComment-58827 Share on other sites More sharing options...
localhost Posted July 16, 2006 Author Share Posted July 16, 2006 Thank you. Using this after login = echo "<script>window.location=\"$where\"</script>";Where $where is $_SERVER['HTTP_REFERER']; Quote Link to comment https://forums.phpfreaks.com/topic/14737-question-holding-temporary-links/#findComment-58836 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.