Welcome Guest, Not a member yet? Register   Sign In
How simply work session ?
#2

There's multiple way to get/set session data. Here's some examples, see the links for more details.

Adding session data: http://codeigniter.com/user_guide/librar...ssion-data
PHP Code:
$newdata = [
        'username'  => 'johndoe',
        'email'     => '[email protected]',
        'logged_in' => TRUE
];

$session->set($newdata);

$session->set('some_name''some_value'); 


Retrieving session data: http://codeigniter.com/user_guide/librar...ssion-data
PHP Code:
$item session('item');
$item $session->get('item'); 
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
How simply work session ? - by lolo57 - 10-21-2020, 12:15 PM
RE: How simply work session ? - by includebeer - 10-24-2020, 08:57 AM
RE: How simply work session ? - by paulbalandan - 10-24-2020, 11:07 AM
RE: How simply work session ? - by InsiteFX - 10-24-2020, 01:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB