Welcome Guest, Not a member yet? Register   Sign In
Setting a session by id
#1

(This post was last modified: 02-24-2017, 01:41 PM by bjacobs.)

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB