Click to See Complete Forum and Search --> : Notice: Undefined index: HTTP_REFERER


Bobby_S
04-28-2007, 05:05 AM
Hi again,

In the google index, I noticed a problem on my site, something similar as you see here:
http://www.google.co.uk/search?q=%22Notice%3A+Undefined+index%3A+HTTP_REFERER%22+%22Oilfield+Workers+Registry%22&btnG=Search&hl=en

When you go to the page yourself, you don't see the Notice...

Is this because the variable is not set when the google spider is indexing webpages? Or why is it?

What can I do to prevent it? I already did some research; is this a good solution:
$log_referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "";
?

Thx
Bobby

bokeh
04-28-2007, 11:42 AM
is this a good solutionYes! or just do this:@$_SERVER['HTTP_REFERER']