Re: Referring Page
| From: | Jonathan Villa | Date: | Thu, 14 Oct 2004 20:20:37 +0000 |
| Subject: | Re: Referring Page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199522@lists.php.net to get a copy of this message | ||
$referrer = $_SERVER['REFFERER'];
something like that...
then you can do something like
if ($referrer == 'whatever')
$sdaf = "whatever";
I usually do something like
if (strpos($referrer,'pagename.php'))
//execute code
> I am trying to set up a script that will do different things based on
the reffering page, without having to include the information in the
URL. Does
> PHP have a built in variable or function that would tell the rest of the
script what page the user came from? Any help is much appreciated.
>
> Ben
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>