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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -