Posted by Jon Slaughter on 05/21/07 18:37
"Akhenaten" <jonkokko@gmail.com> wrote in message
news:1179772114.192174.188640@36g2000prm.googlegroups.com...
> What's the most effective way to capture a URL to pass as a variable?
> I have a login function I want to modify to redirect the user back to
> the page they logged in from. I know how to do the redirect, just
> uncertain of capturing the URL.
>
>
You could store the last page they came from using $_SERVER['HTTP_REFERER']
or you could include some code to keep a FIFO buffer of the last pages
visted(asusming you only want to return to pages on your own site).
So something like
array_push($LastPages, __Current_Page__);
and then you can access the previous pages.
Theres probably better ways though....
Navigation:
[Reply to this message]
|