PHP COOKIE subdomain to domain not working -


i have used following code cookie not working domain.

setcookie('cookiename', 'value', time() + 3600,"/",'.domain.com');  setcookie('cookiename', 'value', time() + 3600,"/",'subdomain.domain.com');  setcookie('cookiename', 'value', time() + 3600,"/"); 

header("set-cookie: cookiename=cookievalue; expires=tue, 06-jan-2019 23:39:49 gmt; path=/; domain=subdomain.example.net");

all above 4 examples not working cookie subdomain domain. please help.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -