matfish Posted July 11, 2006 Share Posted July 11, 2006 Hi,Iv set the cookies, but it takes a cache refresh (manual F5) of the browser in order for it to take affect and show the result on the same page.Anything else I should be doing? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/14285-cookie-problem-dont-slap-me/ Share on other sites More sharing options...
ShogunWarrior Posted July 11, 2006 Share Posted July 11, 2006 Try adding theses headers to your pages where cookie data is used:<meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT"> Quote Link to comment https://forums.phpfreaks.com/topic/14285-cookie-problem-dont-slap-me/#findComment-56135 Share on other sites More sharing options...
shocker-z Posted July 11, 2006 Share Posted July 11, 2006 what you will need to do is set the cookie array like below$value="Cookie text";$_COOKIE['cookie'] = $value;set the cookie as normal using setcookie also and therefor it will work on the first page as u set $_COOKIE['cookie'] variable and also after as it will have been refreshed and cookie will be set now.This is not a problem with PHP it is a limitation of cookies.RegardsLiam Quote Link to comment https://forums.phpfreaks.com/topic/14285-cookie-problem-dont-slap-me/#findComment-56136 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.