Reply to Re: Capture the current page(url) into a variable?

Your name:

Reply:


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....

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация