Why is it that if I create a cookie on www.example.com and check it on example.com, the cookie doesn't exist there? I am planning to just use .htaccess redirect non-www to a www domain. But how do I solve this?
.htaccess
setcookie("CookieName", "value", time()+3600, "/", ".mydomain.com");