Ok I've created a file called nocookie.php and yescookie.php and placed the other code where the banner will be including the banner in the code.
I've searched for how to get javascript to run this php function and I'm stuck again.

but I thought I'd try typing the url with yescookie.php on the end and the banner does not display at all even when refreshed which is a good sign just need to find the javascript code to run onclick.
Thanks soooo much mlseim