Jump to content

Archived

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

localhost

Question, holding temporary links...

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Thank you. Using this after login = echo "<script>window.location=\"$where\"</script>";

Where $where is $_SERVER['HTTP_REFERER'];

Share this post


Link to post
Share on other sites

×

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.