Welcome Guest, Not a member yet? Register   Sign In
CodeIgniters session library - how to?
#3

[eluser]v33s[/eluser]
Hello! Thanks a lot Seppo. That`s I need!

Code:
if (!$this->session->userdata('is_admin'))
Code:
array(
    'id' => $row->id,
    'username' => $this->input->post('username'),
    'is_admin' => true

So I understand it now! Big Grin I must create a session with uniqe phrase like 'is_admin' and type it for TRUE. Next is to check if this session is TRUE and is set. But why I can not use something like that:

Code:
if(!isset($this->session->userdata('is_admin'))


Messages In This Thread
CodeIgniters session library - how to? - by El Forum - 04-13-2008, 04:30 AM
CodeIgniters session library - how to? - by El Forum - 04-13-2008, 07:54 AM
CodeIgniters session library - how to? - by El Forum - 04-13-2008, 08:40 AM
CodeIgniters session library - how to? - by El Forum - 04-13-2008, 08:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB