$_SERVER['HTTP_REFERER'] doesn't work in IE

I'm using $page = basename($_SERVER['HTTP_REFERER']) to find the page the user came from so it can be stored in a database. This works great in FF, but when I go to use IE it doesn't work at all, IE doesn't send the URL like FF does. I understand that HTTP_REFERER is based on what the user agent sends, but why doesn't  IE work with this?  Or is there a better way to get the page they came from as a php variable? Sorry, I know this is short if the question isn't clear let me know and I'll try and say it differently. Thanks.
TheGtrsR1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LinuxNubbCommented:
Directly from php.net

'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.


And from http://www.netregistry.com.au/support/scripting/PHP/php_faq.html#3

http_referer function is not working
The http_referer function does not work with Internet Explorer 6. This is a result of a security patch performed by Microsoft to overcome some weaknesses. The function works fine when run with any other web browser e.g. Mozilla.
TheGtrsR1Author Commented:
Thanks for the info from netregistry...I had not found that one. If I can't do it with HTTP_REFERER...do you know of another way to get the page that the user was referred from and be able to use that variable in PHP? I can do it in javascript, but the problem was that I can't get that variable to PHP directly. I tried using a cookie, but it didn't update every time. I had to refresh the page to get the current cookie.

Any ideas are appreciated.
LinuxNubbCommented:
I'm not sure how else you'll do it.  It's another one of those great php mysteries!
Jay-ShahjCommented:
Hi,

If you want to go with that way of JavaScript then you could try the following:

Get the document referrer:

<script>
var Ref=document.referrer
frames['cwindow'].location.href='reflog.php?ref='+Ref;
</script>
<iframe name=cwindow height=1 width=1 frameborder=0 style="visibility: hidden"></iframe>

^^ Or something like that ^^

And In reflog.php write the ref to a db if the value isn't blank. ($_GET['ref'])


EDIT: could you try using an image as a trick? e.g. image1.src='image.php?ref='+Ref


Jay.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.