HTTP_REFERER vs. session_whatever() vs. header()

From: Date: Wed, 24 Jan 2001 14:45:01 +0000
Subject: HTTP_REFERER vs. session_whatever() vs. header()
Groups: php.general 
Request: Send a blank email to php-general+get-36418@lists.php.net to get a copy of this message
Hi Everyone! I did post the note in the past about the problem with HTTP_REFERER which doesn't work in Netscape 6.0. It turned out that I was looking at the wrong thing the whole time. What I found is that it isn't really Netscape problem. It turned out that Netscape 6.0 can't use 2 times at one time, probably due to the fact that it is slower. ----------------------------------------- What I have in the script are .. $salt = strtoupper(md5(uniqid(rand())).md5(uniqid(rand()))); session_id($salt); session_start(); session_register("user_detail"); // $test = $GLOBALS["HTTP_REFERER"]; // echo $test."<br>"; $ask = "INSERT INTO SESSIONS VALUES('".$PHPSESSID."','".$user_detail[USER_ID]."',CURRENT TIMESTAMP,CURRENT TIMESTAMP,'".$REMOTE_ADDR."') "; $result = odbc_exec($cid,$ask); header("Location: https://www.test.org/test.php?".SID); break; And the 2nd file, test.php, contain the script ... $GLOBALS["HTTP_REFERER"]; ----------------------------------------- When I just add the code for testing which is followed by remark code "//" . Without the remark, the code work but I get the error message stating .... Warning: Cannot add header information - headers already sent by (output started at test.php) in test.php on line ** -------------------------------------- When I put in the remark, the 2nd file, test.php couldn't use $GLOBAL["HTTP_REFERER"] because it couldn't find the last file. I was thinking that maybe the HTTP_REFERER couldn't reach the last file because of the way the header work. Any solution? Any idea? Thanks, Scott

« previous php.general (#36418) next »