save session in database by CodeIgniter -
I want to save the database. In session CodeIgniter User Guide, create an example to store some data in the database. If the table does not exist, then subscribe (session_id varchar (40) DEFAULT is not '0', ip_address varchar (16) DEFAULT '0' is not, usergent varchar (50 ) Faucet, last active int (10) unsigned default 0 no tap, user_data text default '' tap, primary key (session_id));
Now I want to store an extra data from the session in the database, for example request_token value.
  $ this-> session-> Set_userdata 'request_token', 'test');    How should I do this with a session? Go to itempop = "text"> 
 
  Set your configuration.php under the application folder and set the session database option to true. As you import SQL structure and use sessions like yours, it will store session variables in DB. You can also enable session encryption.   
 
  
Comments
Post a Comment