I read about how CI handles sessions differently than native sessions, and I'm a little unsure of storing all the data in a cookie (?), Unlike a native PHP session that only stores the session identifier (?). So I decided to use my own sessions without the CI native_session library.
Now I know that the input class in CI checks Isset with a true / false statement as follows:
if ($this->input->post('something'))
which makes the Isset function unable to work (it gives an error). However, I would like to test my own sessions using the Isset function, so how can I do this? I tried
if (isset($_SESSION['keyHere']))
which gives me an error.
So, to summarize: I want to use Isset in my session array, since I feel like using
if ($_SESSION['keyHere'])
without Isset it can be "dangerous / stupid."
Also, as a last question, I wonder which session processing you think is safer? CI session class or inline PHP processing with server storage, etc.? I would really like to feel as safe as possible when it comes to sessions, regardless of whether this means that I will have to write longer code.
source
share