0
I type the name in the search field and click search the screen is cropped as in the image below. When I refresh the page the result appears and quickly disappears. I made a gif below showing the problem:
Code used in the controller (Codeigniter).
// Details of searched student
function student_details($param1 = ""){
if ($this->session->userdata('admin_login') != 1)
redirect(site_url('login'), 'refresh');
$student_identifier = html_escape($this->input->post('student_identifier'));
$query_by_code = $this->db->get_where('student', array('student_code' => $student_identifier));
if ($query_by_code->num_rows() == 0) {
$this->db->like('name', $student_identifier);
$query_by_name = $this->db->get('student');
if ($query_by_name->num_rows() == 0) {
$this->session->set_flashdata('error_message' , get_phrase('no_student_found'));
redirect(site_url('admin/dashboard'), 'refresh');
}
else{
$page_data['student_information'] = $query_by_name->result_array();
}
}
else{
$page_data['student_information'] = $query_by_code->result_array();
}
$page_data['page_name'] = 'search_result';
$page_data['page_title'] = get_phrase('search_result');
$this->load->view('backend/index', $page_data);
}
Considering that there was feedback, it should not be a problem in the control, but in the view. Probably CSS and/or Javascript/Jquery code programmed(s) erroneously. Try running
print_r($page_data); die();
before loading the view and you will see that the result will be there.– C. Bohok
Thank you, really the problem was in javascript!
– user132420