Hi Jonathon
I recently had to address this accross multiple websites, I think you will find the law only applies to 3rd party cookies, the cookies you are refering to are 1st party cookies i.e. created by your website and therefore are essential to the running of your site and are not covered by the law.
The solution you mention is one that I am using, if you have any 3rd party cookies, simply add the scripts for them within the php code if else statments, these could be anything from Google Analytics, +1's or Facebook likes etc.
EXAMPLE OF HOW I COMPLY
<script type="text/javascript">
var z = jQuery.noConflict();
z(document).ready( function () {
z.ws.jconsent({
displaySettingsSelector: '.displayCookieSettings',
moreInfo: 'Please see our <a href="http://YOUR WEBSITE/privacypolicy.php">Privacy Policy</a>',
geolocate: true
});
});
</script>
<?php
if ((isset($_COOKIE['wsjconsent_consent'])) && ($_COOKIE['wsjconsent_consent'] == true)) {
//We are allowed to present the feature that requires cookies
require_once ("js/analytics.js");
} else {
//We are not allowed to present the feature that requires cookies
// Tell the user that they are getting a less-than-perfect experience?
echo '<p style="background-color:#333333; color:#ffffff; padding:5px; text-align:center; font-family:Arial, Helvetica, sans-serif; text-transform:uppercase; font-size:10px; border:1px solid #ff0000;">3 <sup>rd</sup> party cookies are disabled !</p>';
}
?>
If you notice the cookies notice will not display if you are outside the EU, also it will display a message that notifies the user that they have disabled the 3rd party cookies.
It works very well and I strongly recomend it, you can remove the link by purchacing a licence for £25.
Hope this helps.