Prompt you need to make the file name unique using microtime and making
$formatted_filename = str_replace(".", "_", microtime(true)) . $_FILES["image"]["name"]; $file = $formatted_filename; $config['file_name'] = $file; echo '<pre>$config::'.print_r($config,true).'</pre>'; $this->load->library('upload', $config); $this->upload->initialize($config); $data['image'] = $file; echo '<pre>$data::'.print_r($data,true).'</pre>'; I see that the file name 2 was copied to the file copy and to the array for writing to the database $ data BUT different And the latter later on some hundredths? What is the right way then ? Or is there a better way?
Thank!
microtimeinto a separate variable and paste it in and out and there - Alex Shimansky