so, cookies aren't working on live version of website work on localhost (test) version. missing here?
setcookie('cookiename', $cookie, strtotime( '+365 days' ) );
here's code looks like. need declare cookie usage or that?
if(isset($_cookie['cookiename']) , $_cookie['cookiename'] != ""){ echo 'yes'; }else{ echo 'no'; }
here's if statement returns yes on localhost no on live servers. they're in seperate files.
update: cookies work on chrome , opera, not safari , firefox.
try before setting cookie:
ini_set("session.cookie_domain", ".yourdomain.com");
Comments
Post a Comment