[eluser]Firenter[/eluser]
Hi forums!
I'm getting this weird problem that makes one of my pages give a 404 error when trying to load it.
I'm not sure where i'm going wrong with this so here's the code for the entire controller.
Code:
class index extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->helper('form');
$this->load->library('session');
}
public function index() {
$data['title'] = 'Studypointer';
$partials = array('header' => 'main_header', 'content' => 'home', 'sidebar'=>'side', 'footer' => 'main_footer');
$this->template->load('main_master', $partials, $data);
}
public function login(){
if($this->session->userdata('login')==0){
$data['title'] = "Studypointer login";
$partials = array('header' => 'main_header', 'content' => 'login', 'sidebar'=>'side', 'footer' => 'main_footer');
$this->template->load('main_master', $partials, $data);
}
else{
if($this->session->userdata('login')==1){
redirect('docent/index');
}else{
redirect('admin/index');
}
}
}
}
The function that's not working is the login.
I've tried just copying the index function and changing the 'content' variable from home to login but that doesn't work either.
If you have any suggestions please let me know...