[eluser]theprodigy[/eluser]
Quote:$file_data = $this->upload->data();
//$file_name = $file_data['file_name'];
$fields = array(
"module_name"=>$this->input->post('module_name'),
"slug"=>$this->input->post('slug'),
"icon"=>$this->input->post('file_name'),
"report_file_name"=>$this->input->post('report_file_name'),
"sql_select"=>$this->input->post('sql_select'),
"sql_filter"=>$this->input->post('sql_filter'),
"sql_order"=>$this->input->post('sql_order')
);
Notice the difference between your version and mine. (HINT: I have bolded them)
Quote:$file_data = $this->upload->data();
$file_name = $file_data['file_name'];
$fields = array(
"module_name",
"slug",
//"icon"=>$file_data['file_name'],
"icon"=>$file_name,
//'icon' => $file_name,
"report_file_name",
"sql_select",
"sql_filter",
"sql_order"
);
The "icon" DOES NOT RESIDE IN THE POST ARRAY. You CANNOT get it from there. The $this->input->post() function pulls from $_POST.