[EDIT - I have posted the answer to my question below]
EE 5.2.4
I'm having issues trying to use $_SESSION
in EE.
What I would like to do is save an Amazon cart ID in the $_SESSION
. Working in regular PHP I'm familiar with this: $_SESSION['cart_id'] = 1234
. However when I try to do this in EE I get errors and/or nothing happens.
I thought that maybe what I'm looking for is the cache-access functionality:
So in my class I have this ee()->session->set_cache('amz_cart', 'id', $value);
, and in my view I'm trying to see what returns from this ee()->session->cache('amz_cart', 'id');
.
Nothing returns with this. Can anyone point me in the right direction?
Thanks!
$_SESSION
does. I would simply use$_SESSION
but when I dovar_dump($_SESSION)
I getUndefined variable: _SESSION
. I need this variable to be global. It seems like it should be a simple answer and I'm not sure why$_SESSION
isn't permitted. – Shayne Jul 11 '19 at 21:04