[eluser]Avril[/eluser]
Well, the default controller was on 'homepage', this is the code:
Code:
<?php
class Homepage extends Controller {
function index(){
$is_logged_in = $this->session->userdata('is_logged_in');
if(!isset($is_logged_id) || $is_logged_in != TRUE){
$data = array(
'main_content' => 'includes/session/login',
'username' => array(
'name' => 'username',
'id' => 'username',
'class' => 'normal-input-field',
'value' => 'Username'
),
'password' => array(
'name' => 'password',
'id' => 'password',
'class' => 'normal-input-field',
'value' => 'Password'
),
'submit' => array(
'name' => 'login-submit',
'id' => 'login-submit',
'value' => 'Login'
),
);
$this->load->view('includes/template', $data);
}else{
$data['main_content'] = 'includes/account/account_overview';
$this->load->view('includes/template', $data);
}
}
}
Changing it to any other controller doesn't change anything, I don't understand why it isn't working and I don't see where I went wrong. I really think that it is because I don't see any data that I've added in the cookie when I'm checking the cookie.
How can I be sure that $this->session->set_userdata() has worked?