load->view('header'); $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); if ($this->form_validation->run() == FALSE) { // login page $this->load->view('login'); } else { echo "Done"; } // Footer $this->load->view('footer'); } } ?>