if ($this->validation->run() === FALSE) { $this->load->view('admin/login'); }else { // everything is ok redirect('home'); }