I'm working with making my website compliant with EU cookie directives, and on the homepage, I need help with figuring out how to include a cookie warning message, and a the script that disables Google Analytics.
I have made a set of preference cookies to be set for the website.
My site is made with SSIs: meta header newsletter -- page content -- footer
In my Header SSI, before my content, immediately after my body tag opens, I need to include a small page I made to ask for consent for cookies (/inc/cookies.shtml)
how would I get a php script to insert the contents of cookies.shtml?
somewhat wrong code I made :( :
<?php
if ($_COOKIE["shcpr"] == TRUE)
/* If the user has agreed to accept cookies, just stop this script or whatever */
{die()}
else
/* If the shcpr cookie value is not TRUE, include the warning box */
{include 'inc/cookies.shtml'}
?>
/inc/cookies.shtml
<div id="cookie-outer"> cookie warning content and form to consent and stuff is here </div>