Answer the question
In order to leave comments, you need to log in
Do domain cookies work from a subdomain?
A visitor comes, I immediately set a cookie for him, then there is a redirect to the mobile version if he came from a mobile phone. But in fact, I put the cookie on the regular version of the site yet. Would it be possible to see it in $_COOKIES from m.site.com ?
Answer the question
In order to leave comments, you need to log in
yes it works like this:
setcookie('cookies-name', 'cookies-value', time()+3600 * 24 * 365, "/", ".mysite.com");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question