Welcome Guest, Not a member yet? Register   Sign In
Multiple Session Problem
#1

[eluser]Unknown[/eluser]
Hi Everyone,

Is there any way to create multiple sessions at the same time in codeigniter ? I need to create multiple sessions ( Administrator and User) at the same time. Thanks in advance.
#2

[eluser]Dam1an[/eluser]
Why would you need that as 2 seperate sessions, instead of a single, combined session?
#3

[eluser]Colin Williams[/eluser]
I think you are confusing the role of sessions. More specifically, what are you wanting to do?
#4

[eluser]jayrulez[/eluser]
i think the person wants a result like

Code:
$_SESSION['user'] = 100;//user id
$_SESSION['admin'] = 'yes';
#5

[eluser]Colin Williams[/eluser]
Then

Code:
$session = array(
  'user' => 100,
  'admin' => 'yes',
);
$this->session->set_userdata($session);

How one could not glean that from the User Guide is beyond me. Maybe it is a different issue...




Theme © iAndrew 2016 - Forum software by © MyBB