Search code examples
phpflashsessioncodeigniteruploadify

How to load/use MY_Session in CodeIgniter?


I am having difficulty in getting the session values when I use the Flash uploader (Uploadify) with CodeIgniter. I have stored some values in session, for example userID. Now I need to get the userID in the backend script, but the problem is that the flash creates a new session instead of using existing session.

I have found some kind of (probably incomplete) solution here, which suggests to create MY_Session and add some code in it. Can someone please have take a quick look at the link and tell me how can I use this solution? For example how and where should i load MY_Session.php file and how can i get the existing session data?

Thanks for help.


Solution

  • If you place a MY_Session.php file in your library folder, it will be used instead of CI_Session (the default session object). Then you can follow the example here to see how to set session_id programmatically (read the discussion too).