Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

server[referer] problem

2:49 pm on Mar 7, 2006 (gmt 0)

New User

10+ Year Member

joined:Mar 1, 2004
votes: 0

Hi, can anybody help me with this?
I have two pages, first.php and second.php. When first.php is been called it redirects to second.php (javascript: location.href="second.php" or replace, it does't matter at the time).
At second.php I want to identify the calling page (which here is first.php). I tried to use $_SERVER[REFERER] but it doesn't come up with anything. Could you please help me understand why and
propose something as a solution? Actually what i want to get is the parameters of the first.php without the use of get method (second.php?bla=bla..)
3:24 pm on Mar 7, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
votes: 0



3:53 pm on Mar 7, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 8, 2004
votes: 0


aside of that, referrer info is blocked by a lot of firewalls, so if I was you, I wouldnt rely on it too much....

11:22 am on Mar 8, 2006 (gmt 0)

New User

10+ Year Member

joined:Mar 1, 2004
votes: 0

Thanks for the answers.
Is there any other way to achieve what I want?
12:31 pm on Mar 8, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 26, 2005
votes: 0

Set it in a session?
//on page 1
$_SESSION["ref_page"] = "first.php";

//on page 2
$ref_page = $_SESSION["ref_page"];