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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -