Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Setting a session by id

$
0
0
I'm using a very old version of CI (2.0.2) and I'm having a problem where if I have multiple sessions in the ci_sessions table, on a redirect back to my site, it's grabbing the first session it sees instead of the one it left the site with. 

I have decided to store the appropriate session ID in my db. But now when you redirect back to my site, I want to set the current session to be the one I had stored the ID for.

I see lots of things on setting the session_id, but how to I actually set the current session based on a session ID?

Ex: I can see two session records in the ci_sessions table. Say one with session_id="a" and one with session_id="b". I'm currently working in "a". When I redirect and come back, it is now on session "b" or creates "c". I want to set it back to "a", which I can see still exists in the ci_sessions table.

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>