[eluser]JunlieF[/eluser]
function search(){
//redirect if user
if($this->data['role']==2 + 1)
redirect(base_url().'dashboard/layout');
if($_POST){
$this->load->model('print_model');
$this->load->model('');
$dept = $this->input->post('dept'); \\is the category for the department made of select tag in html
$from = $this->input->post('from'); \\date and time between to
$to = $this->input->post('to'); \\ date and time
$this->data['prints']= $this->($dept)->print_model->betweenDates($to, $from);
//$sql = “SELECT * FROM prints WHERE request_id = ’$dept’ AND date_printed BETWEEN {$from} AND {$to}”;
//$prints = PrintDetails::find_by_sql($sql);
//echo "<pre>";
//print_r($prints);
}
$this->load->view('search_view.php', $this->data);
}
how to convert into codeigniter?