Basically I want anyone who goes to my website confirm they're over 18 with a simple yes or no button. How can I do this?
<script type="text/javascript"> var agev = document.cookie; if(agev!='age=1'){ if(confirm("Are you above 18 years?")) setCo(); else window.location.href = "http://yoursite.com/notallowed.htm"; function setCo(){ document.cookie = 'age=1; path=/' } </script> Try this, might contain syntax errors, did not test it. and change yoursite.com to ur domain