From The Blog

PHP: make the cookies work globally on all subdomains

2 January 2013, in

To make cookies work globally on subdomains of a domain:

setcookie('CookieName', 'Value', time() + 3600, '/', '.mydomain.com');

Note: 
remember to use the dot (.) in '.mydomain.com' not 'mydomain.com'


Post a Comment