Hi,
This is my current situation.
Through my home page I submit a form and then store these values in a cookie and then redirect it to another page. I check the cookies through the browser. Everything works fine.
Now when I again enter my home page and enter different set of details, the same thing should repeat but the information displayed in the redirected page has obsolete value.
I checked the cookie in the browser and it has the updated value. But the redirected page display an obsolete value. I do not know how this is happening. I suspect that the superglobal variable $_COOKIE that I am using in a snippet in my redirected page does not contain the updated cookie information.
Please help me with this issue. I have been struggling with this issue for a week now.
--
Vinzy
Vinzy
If the page is cached, try calling the snippet uncached. If the page is uncached, call the snippet cached. (I assume you’re not using MODx Revolution.)
BTW, is there a reason you want to use a $_COOKIE rather than a $_SESSION variable?
Hi,
There is one specific reason. My session variable is continuously getting reset when I redirect to another page. This is reason I am trying to use a cookie in place of the session variable. I tired calling the snippet with cache disabled. Still the cookie value that is displayed is obsolete. :-(
--
Vinzy
Vinzy
Hi,
By calling the snippet with cache disabled actually solved the problem. Hurray..Thanks a lot for your help
--
Vinzy
Vinzy
Glad it worked.
This problem goes away in MODx Revolution but in your version, caching is kind of reversed from what you’d expect at each level as you move throuth the levels of nested elements.