Welcome to WebmasterWorld Guest from 54.147.217.76

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

server[referer] problem

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

10+ Year Member



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..)
Thanks
3:24 pm on Mar 7, 2006 (gmt 0)

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



$_SERVER['HTTP_REFERER']

dc

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

10+ Year Member



true

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)

10+ Year Member



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

10+ Year Member



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

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

Regards,
IamStang