I'm using an if statement along with PHP's $_SERVER['HTTP_REFERER'] to check if users came from the home page and perform some functions if they did:
if($_SERVER['HTTP_REFERER'] == htttp://www.example.com {
//some code
}
The problem is that the homepage will sometimes be passing GET variables in the URL and PHP's $_SERVER['HTTP_REFERER'] method considers a URL with a GET variable as a different URL and therefore won't trigger the if function unless the user comes from the home page without passing a GET variable.
I'd like to trigger the if statement when someone comes from the home page regardless of whether a GET variable is passed, any help would be greatly appreciated!