hi everyone...im having an issue with collecting the data using HTTP_REFERER

the problem is if i paste or type a referral url into the url bar it gives an error :-
Message: Undefined index: HTTP_REFERER

but if i click the link from another site it works perfect...

i understand that the error is because ts looking for a url of where the link came from, and if i pasted it, then there isnt a refferal url

but how would i write a code that will bypass this?

im thinking it would be a if/else command but i cant seem to get anything to work!

i need somethin that will say "if site url exists then collect data otherwise goto website normally"

any ideas please??

Recommended Answers

if(isset($_SERVER['HTTP_REFERER']))....
Jump to Post

All 2 Replies

Member Avatar
if(isset($_SERVER['HTTP_REFERER']))....

excellent thank you...i was missing the isset command haha i cant beleive i overlooked that

thanks very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.