1

My issue is about $_SERVER['HTTP_REFERER']. I can't get the value of http_referer on my server or may be due to Firefox. But I've also printed print_r($_SERVER); but still it doesn't provide me previous page's link.

Smi
  • 13,850
  • 9
  • 56
  • 64
Kamran
  • 11
  • 1

1 Answers1

0

This is directly from PHP.net

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.

I'm thinking it may be a firefox issue. What version are you using?

Community
  • 1
  • 1
k4t434sis
  • 519
  • 4
  • 17
  • thanks for answering k4t434sis .. but actually its not a solution i think. – Kamran Aug 23 '11 at 21:47
  • I would suggest implementing $_SESSION vars that record the previous page's $_SERVER['REQUEST_URI'] if you cannot solve this quick. I've personally never had that global come back null, that's why I'm thinking it's a browser issue (possibly something Firefox will fix after 6 comes out of beta). Also check out this question: http://stackoverflow.com/questions/165975/determining-referer-in-php#answer-166005 – k4t434sis Aug 23 '11 at 21:55