Druid Posted March 7, 2007 Share Posted March 7, 2007 I have a value I store in cookies and a mysql db, which I allow members to modify. Problem is, the value in the DB gets updated but the cookie doesn't seem to want to change. I'm on windowsxp Apache 2 and php 5. Here's what I have: <? ** update db here*** setcookie("color", "", time()-3600); setcookie("color", "", time()-3600, "/"); setcookie("color", $newvalue, time()+3600); ?> The page which edits this value is in the http://www.blah.com/edit/ folder. Seems the cookie is reset, when I go to http://www.blah.com/ the change takes place. But if I go back to http://www.blah.com/edit/ it's still set to the previous value. Could someone lemme know what it'll take to update the value for the entire site? Quote Link to comment https://forums.phpfreaks.com/topic/41673-cant-seem-to-reset-cookies/ Share on other sites More sharing options...
Ninjakreborn Posted March 7, 2007 Share Posted March 7, 2007 Could have something to do with your browser. You may be setting a new cookie each time instead of a new one. It could be a large number of things. Quote Link to comment https://forums.phpfreaks.com/topic/41673-cant-seem-to-reset-cookies/#findComment-201934 Share on other sites More sharing options...
Druid Posted March 7, 2007 Author Share Posted March 7, 2007 what can you suggest to minimize the problem? Quote Link to comment https://forums.phpfreaks.com/topic/41673-cant-seem-to-reset-cookies/#findComment-201967 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.