Jump to content

Archived

This topic is now archived and is closed to further replies.

newman

problem with cookie

Recommended Posts

hi all . i've got a problem with cookies .
when i add www in my URL the cookies do not work .
1 ) http://mydomain.com ( cookies work )
2 ) http://www.mydomain.com ( cookies do not work )
have anyone had this problem ?
thanks in advance .

Share this post


Link to post
Share on other sites
http://www.php.net/manual/en/function.setcookie.php

domain argument for setcookie: "To make the cookie available on all subdomains of example.com then you'd set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com  will make the cookie only available in the www  subdomain"

so to make it work for everything, maybe try ".mydomain.com" as the domain argument in setcookie()

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.