CodeIgniter Forums

Full Version: session problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi i'm using ci-version 3.19 and i am having problem in session . 

sceneraio:

i have loaded session libraray in config folder and  controller.

 public function __construct() {
parent::__construct();
    $this->load->library('session'); 
   $this->load->model('product_model');
    
 }


problem: after initialising session in one controller i am n't able use the session id for another controller and  nor i am able to use it in different page.
@bibash bagh,

Why don't you just autoload it (/config/autoload.php section auto-load libraries [ https://codeigniter.com/user_guide/libra...sion-class ] ) and it will always be available. This way all you have to do is reference it.