homepage Welcome to WebmasterWorld Guest from 54.205.119.163
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
server[referer] problem
hartzoua




msg:1314446
 2:49 pm on Mar 7, 2006 (gmt 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..)
Thanks

 

dreamcatcher




msg:1314447
 3:24 pm on Mar 7, 2006 (gmt 0)

$_SERVER['HTTP_REFERER']

dc

dmmh




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

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....

hartzoua




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

Thanks for the answers.
Is there any other way to achieve what I want?

IamStang




msg:1314450
 12:31 pm on Mar 8, 2006 (gmt 0)

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

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

Regards,
IamStang

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved