You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

GetSession and SetSession does not always work

Received Response
28
Views
3
Comments
edited Feb 16, 2018 10:18AM in Customer Portal 3 comments

Content

Hi All,

We set and get data in to the session variable like shown in the code snippet below. Sometimes the session variable works and sometime it is empty. Not always it works. Any ideas on  how to correct this or is it controlled by any setting?

 

Code Snippet

             $CI =& get_instance();
        // echo $_POST['SessionID'];
        $CI->session->setSessionData(array("pchatsessionid"=>$_POST['perchatsessionid']));  
        echo json_encode($CI->session->getSessionData("pchatsessionid")); 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!