Welcome Guest, Not a member yet? Register   Sign In
session problem
#6

[eluser]ciGR[/eluser]
I saw what you have in your code.
You have this
Code:
$this->session->set_userdata($session_data);

But I suggest you the

Code:
$this->session->set_userdata('user',$session_data);

In your code as you can see you get the values one at atime
with
Code:
$username = $this->session->userdata('username');
$passwod = $this->session->userdata('password');

But with the second way I tell you can get an array from your session.
Code:
$user = $this->session->userdata('user');

//and now check
foreach($user as $field):
    if(empty($field)):
       return false ;
    endif;
endforeach;

Hope to understand the difference.


Messages In This Thread
session problem - by El Forum - 03-27-2010, 06:04 AM
session problem - by El Forum - 03-27-2010, 06:43 AM
session problem - by El Forum - 03-27-2010, 07:02 AM
session problem - by El Forum - 03-27-2010, 07:18 AM
session problem - by El Forum - 03-27-2010, 10:15 AM
session problem - by El Forum - 03-27-2010, 10:42 AM
session problem - by El Forum - 03-27-2010, 12:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB