[eluser]davidbehler[/eluser]
A couple of things I noticed so far:
1. redirect() doesn't require the index.php, just use the uri string:
Code:
redirect('registrar/main_page');
2. I would switch the order of the validation rules and run trim() before the required rule is run:
Code:
$this->form_validation->set_rules('username', 'Username', 'trim|required|max_length[50]|xss_clean');
3. Why do you use extract()? Definetly not needed, just access the $_POST array directly or use the post method of the input class:
Code:
$username = $_POST['username'];
// or
$username = $this->input->post('username');
And your error description doesn't help at all. Have you tried to debug your code by adding some echos? E.g. after the validation is run, after the check_login method is called? What does "i cannot proceed to the redirect function…" mean anyway? What happens instead?