Bit of a silly problem on the website I work on, hoping to find a solution.
I've created a cookie consent banner (to comply with EU law). When the user clicks accept, it reloads the current page but with a ?accept-cookies after the URL. The code then checks for this and sets a cookie which means the banner doesn't show any more.
This works on EVERY SINGLE PAGE except the index. I'm assuming it's because the index strips the actual "/index.php" part from the URL and leaves it just as www.example.com?accept-cookies
so for some reason the code doesn't check for the $_GET variable in this instance. Just to reiterate, on any other page (for example www.example.com/anotherpage.php?accept-cookies
) this works perfectly.
Does anyone have any idea how I can get round this?