Hi to the community,
I have a bunch of data created on page (not EE template page, but module’s action page - if that matters) that I need to pass to another page (again, of ACT=xx type). I obviously can pass the data as GET request, but don’t really want to expose some of the data in any way. Another option is setting the cookie for each variable, but it looks a bit awkward to me.
I would prefer saving data to session (whatever session type user has chosen). $this->EE->session->set_cache() unfotunately does not work between page loads. Trying to set directly $this->EE->session->my_variable does not work as well.
So, should I go with cookies or is there a better way? Any method that I’m not aware of?
If you don’t want to use cookies on the client site you could use PHP’s native $_SESSION depending on the type of data you’re working with. You could also store temporary data in the DB, but I’d be sure to benchmark the options and be comfortable with the time required for those options.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.