newman Posted September 5, 2006 Share Posted September 5, 2006 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 . Quote Link to comment Share on other sites More sharing options...
newman Posted September 6, 2006 Author Share Posted September 6, 2006 can anyone help ? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 6, 2006 Share Posted September 6, 2006 hwat parameters are you passing to the setcookie function? Quote Link to comment Share on other sites More sharing options...
arianhojat Posted September 6, 2006 Share Posted September 6, 2006 http://www.php.net/manual/en/function.setcookie.phpdomain 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() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.