[eluser]Michal1[/eluser]
Hey, thanks for the help. I reedit your code little bit as there were some mistakes and it almost works.
The only problem is with:
Code:
function validate()
{
if ($query=$this->login_model->validate_login())
{
$data = array (
'logged_in'=> true,
'user_ids'=>$query->id
) ;
$this->session->set_userdata($data);
redirect('site');
}
in user_ids part where I am inserting $query->id (which as you said should insert a id value from database. But it does not insert it

and I dont know why.
If I insert some value manually for example user_ids'=>'2' then the whole works perfectly then. So there must be some probably with $query->id