Hello,
I am building a plugin which attempts to set a custom $SESS class variable which needs to be stored and reused within multiple template groups in the EE site. My question is: Is a $SESS->cache variable reset after each page renders?
What I want to do is check if the $SESS variable is already set, and if not, set it for reuse.
if (!isset($SESS->cache['custom']['variable']))
{
$SESS->cache['custom']['variable'] = $IN->GBL('ID');
} else {
$SESS->cache['custom']['variable'] = "value";
}
This code works, but it doesn’t seem to retain the $SESS variable. Is a COOKIE a better approach in a case like this?
Cheers
Moved by Moderator
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.