"Akhenaten" <jo******@gmail.comwrote in message
news:11**********************@36g2000prm.googlegro ups.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....