Tech Support Guy banner
Status
Not open for further replies.
1 - 5 of 5 Posts

·
Registered
Joined
·
2,382 Posts
Discussion Starter · #1 ·
Hello guys;

Not sure why, but I just made a very simple send to friend script (in response of another post on here) and for some reason when I set the REFERER
PHP:
//define server relation of page
[email protected]$HTTP_REFERER;

//send headers to client
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";
it would not send a link of the page, just a blank area in the email.
It then used
PHP:
$ref=$_SERVER['HTTP_REFERER']
and it sent the referring link fine.

Any ideas why this would need the server part before the HTTP_REFERER?
Could this be something with my server set up?
I have register_globals off so I am stumped as to why I needed the first part to send the link.

Any ideas, thanks in advance.
 

·
Registered
Joined
·
414 Posts
I believe register globals off will mean you need to use teh abolute hash array, ie the $_SERVER part. if register globals was on you would be able to access the referer inm you previous method.

I thinks that's right.

Harry
 

·
Registered
Joined
·
3,625 Posts
I believe register globals off will mean you need to use teh abolute hash array, ie the $_SERVER part. if register globals was on you would be able to access the referer inm you previous method.

I thinks that's right.

Harry
That is correct.

register globals makes it so that the suber globals ($_GET, $_POST, $_REQUEST, $_SESSION, $_COOKIE, $_SERVER, $_ENV) keys are set as variables.

http://www.php.net/manual/en/ini.core.php#ini.register-globals
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top