CodeIgnitor: How the view get loaded automatically for the form page?
<?php class Form_valid extends CI_Controller { function index() { $this->load->helper(array('form','url')); $this->load->library('form_validation'); $this->form_validation->set_rules('user',"User Name","required"); $this->form_validation->set_rules('password',"Password","required"); $this->form_validation->set_rules('confirm_password',"Confirm Password","required"); $this->form_validation->set_rules('email',"Email","required"); if($this->form_validation->run() == FALSE) { $this->load->view('example23)/form_view'); } else { $this->load->view('example23)/form_success'); } } } ?> // As you can see in the above , i haven't loaded my view file,like : $this->load->view('example23)/form_view'), than how this view file gets loaded at the start of the execution of the program. Is it because, since there no input in intial. So, the run() method returns false and hence , the view gets loaded and after providing the data and clicking the submit button, the run() method returns TRUE , since the validation is set now as data is provided . So, it will load the form_success view page? Please answer