This works very well if there was a refering page, but if there was no refering page (i.e. a direct link) then I get
Notice: Undefined index: HTTP_REFERER
How can one overcome this. to avoid this Undefined prefix.
I have tried isset but this does not work.