djanim8 Posted August 7, 2007 Share Posted August 7, 2007 ok I have 2 pages that save cookies, and one is in a folder called "myevent" (mydomain.com/myevent/) and the other is at the root of the website (mydomain.com/) Is there any way to get the same cookie to load in both the folders? here is the code I use to save them: setcookie("contNumber",$_POST['txtContNum'],time()+60*60*24*30,"","mydomain.com",0); setcookie("emailAddy",$_POST['txtEmail'],time()+60*60*24*30,"","mydomain.com",0); Quote Link to comment https://forums.phpfreaks.com/topic/63653-cookies-with-different-folders/ Share on other sites More sharing options...
Fadion Posted August 7, 2007 Share Posted August 7, 2007 A cookie with the same name but different values for different folder? I guess no. Im sure u can find a way around using two different cookies then just stress yourself making things complicated. Quote Link to comment https://forums.phpfreaks.com/topic/63653-cookies-with-different-folders/#findComment-317225 Share on other sites More sharing options...
djanim8 Posted August 8, 2007 Author Share Posted August 8, 2007 they store the same values, the cookie has the same name, just one is stored at the root, and one is stored from a folder that is named "myevent" I thought cookies worked site-wide... is there any way around this? Quote Link to comment https://forums.phpfreaks.com/topic/63653-cookies-with-different-folders/#findComment-318345 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.