Jump to content


Photo

Question, holding temporary links...


  • Please log in to reply
2 replies to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 16 July 2006 - 04:37 AM

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.

#2 hvle

hvle
  • Members
  • PipPipPip
  • Advanced Member
  • 667 posts
  • Locationmelbourne, Australia

Posted 16 July 2006 - 05:10 AM

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
Life's too short for arguing.

#3 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 16 July 2006 - 05:32 AM

Thank you. Using this after login = echo "<script>window.location=\"$where\"</script>";

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users