jimmyo Posted March 23, 2009 Share Posted March 23, 2009 Hello and thank you in advance for any help you can provide; I have looked through the help files and was unable to find an answer to the specific problem I'm having. I am using the 'setcookies' command and am finding that sometimes my cookies are set and sometimes they are not. I've narrowed things down such that if an end-user enters the site via http://www.xxx.com (where xxx is my domain) and cookies are set, and then re-enters the site later via http://xxx.com the cookies are not found. Is there a way to ensure that the cookies can be read in all cases (ie both set and read from either 'entry point'). Thank you. ...Jim Link to comment https://forums.phpfreaks.com/topic/150748-cookie-inconsistency/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 23, 2009 Share Posted March 23, 2009 Yes there is. Please read the setcookie page in the php manual and you will find that there is a domain parameter that needs to be used. You might also want to use the path parameter so that the cookie is available within different paths as well. Link to comment https://forums.phpfreaks.com/topic/150748-cookie-inconsistency/#findComment-792006 Share on other sites More sharing options...
jimmyo Posted March 23, 2009 Author Share Posted March 23, 2009 OMG thanks .. I really don't know how I missed that. Link to comment https://forums.phpfreaks.com/topic/150748-cookie-inconsistency/#findComment-792027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.