Re: URL of calling page

From: Date: Mon, 17 Feb 2003 04:17:19 +0000
Subject: Re: URL of calling page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135795@lists.php.net to get a copy of this message
On Sun, 16 Feb 2003 15:58:30 -0600, Acleave <acleave@uark.edu> wrote:
I believe there's a way in PHP to get the URL of the page that called the current page but can't find it. Is there such a function? Or would I have to use another script (like Javascript)? What I mean is if I click on a link on index.html to jeremiah.php I can call the function and find out I just came from index.html (and not henry.php or fred.php).
If you're trying to get back to a page, I would suggest passing the current page as a variable to the next page. e.g. <a href="somepage.php?return_to=<? echo urlencode($_SERVER['REQUEST_URI']) ?>">Subscribe</a> -- _BB

« previous php.general (#135795) next »