Page 1 of 1

Changing server variables

Posted: Mon Feb 02, 2004 5:19 pm
by pickle
Hi all.

This is absolutely mystifying me - I was hoping someone here would know.

I need to get at the variable $_SERVER[HTTP_REFERER]. However, for some reason it is not available. When I echo the server variables on one page, HTTP_REFERER is in the $_SERVER array. However, when I echo the server variables from another page on the same server, HTTP_REFERER is not found. Does anyone know why this may be happening? Thanks.

Posted: Tue Feb 03, 2004 1:04 am
by teniosoft
can you show us the code for the two different pages of code.

Posted: Tue Feb 03, 2004 2:46 am
by twigletmac
HTTP_REFERER is set by the client (browser) so that can impact whether or not it is available.

Mac

Posted: Tue Feb 03, 2004 10:14 am
by pickle
1) The code for both pages is

Code: Select all

<?php

print_r($_SERVER);

?>
I've been very careful to ensure both pages have the same code.

2) I am viewing both of these pages using the same copy of IE6 on my computer. Is there some hidden condition that I'm not aware of?

Thanks.