anonymopt Posted April 8, 2009 Share Posted April 8, 2009 im creating an adult website and i wanted that the first page asks the users to press "yes" if they are over 18 and "no" if they are under. the cookie was to remeber the user choice... so if the user pressed yes he would never be asked again if he was 18. I tried this using cookies but with no sucess.. can soemone suggest me the code? Link to comment https://forums.phpfreaks.com/topic/153224-php-cookies/ Share on other sites More sharing options...
9three Posted April 8, 2009 Share Posted April 8, 2009 Show us your code so we can fix it. Link to comment https://forums.phpfreaks.com/topic/153224-php-cookies/#findComment-804901 Share on other sites More sharing options...
anonymopt Posted April 8, 2009 Author Share Posted April 8, 2009 Show us your code so we can fix it. i erased everything... it wasnt working at all.. nobody has suggestions? Link to comment https://forums.phpfreaks.com/topic/153224-php-cookies/#findComment-804926 Share on other sites More sharing options...
anonymopt Posted April 8, 2009 Author Share Posted April 8, 2009 <? $x = $_COOKIE["visitabuddy"]; if($x == "Adult") { echo "<script language='javascript'> var d = document; d.location.href='http://pornbuddy.org/blog/'; </script> "; } else { echo "" } ?> and on the other page... <? $inTwoMonths = 60 * 60 * 24 * 30 + time(); setcookie('visitabuddy', 'Adult', $inTwoMonths,'/','pornbuddy.org'); ?> but it doesnt work in IE 7 only on firefox Link to comment https://forums.phpfreaks.com/topic/153224-php-cookies/#findComment-804946 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.