or $_SERVER["HTTP_REFERER"]

availability depends or server though...

regds,

-----Original Message-----
From: Luke Woollard [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 10:48
To: PHP-general
Subject: RE: [PHP] Re: URL of calling page


dude - try this:

echo $HTTP_REFERER;

It'l give you the refering page from when you came.

Luke Woollard






-----Original Message-----
From: Brendon [mailto:[EMAIL PROTECTED]]
Sent: Monday, 17 February 2003 3:17 PM
To:  Acleave
Subject: [PHP] Re: URL of calling page


On Sun, 16 Feb 2003 15:58:30 -0600, Acleave <[EMAIL PROTECTED]> 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to