[eluser]johnmiller[/eluser]
in the controller, i use the below function to load the search page for the first time.
Code:
function search()
{
$this->load->model('location_model');
$this->load->model('team_model');
$this->load->model('organization_model');
$data['query_state'] = $this->location_model->select_all_states();
$data['query_city'] = $this->location_model->select_all_cities();
$data['query_team'] = $this->team_model->select_all_teams();
$data['query_org'] = $this->organization_model->select_all_org();
$data['query_org_type'] = $this->organization_model->select_all_org_types();
$this->load->view('search', $data);
}
after search button click, i use another function in controller
that function is
Code:
function do_search()
{
$this->validation->set_error_delimiters('<div id="errorLogin">', '</div>');
$rules['fname'] = "trim|required|max_length[100]|xss_clean";
$this->validation->set_rules($rules);
$fields['fname'] = "First Name";
$this->validation->set_fields($fields);
if($this->validation->run() == FALSE)
{
$this->load->view('search');
}
else{
$fname = $this->validation->fname;
$this->load->model('search_model');
$data['search_details'] = $this->search_model->search_students($fname);
$this->load->view('search_results', $data);
}
}
so where i should write the library???
in the search function?
what all things I should add?
i am getting the error in the view page...
means... in the first load..
that means... we have to add the library in search function, right?
what i should write there?