Welcome Guest, Not a member yet? Register   Sign In
issue with uploader
#1

Hi,

I am trying to understand the uploader.  I have a uploader.php with the config in and it does work if I break the code inside it, so I know its being loaded.

I have this process at the moment and it works and adds the bit to the database but its not uploading the image.

PHP Code:
public function upload_image_process(){
 
           
            $upload_image 
$this->input->post('upload_image');
 
           
            $data 
= array(
 
           
                
            
            
'name' => $this->input->post('image_name')
 
           );
 
          
            if 
(is_array($data) && count($data)>0){
 
             
              $this
->upload->do_upload($upload_image);
 
             $this->Admin_model->add_content($data'image_uploads'); 
 
             $this->session->set_flashdata('message''Image uploaded.');
 
             redirect('admin/dashboard');  
            
            
} else {
 
           
            redirect
('admin/dashboard');
 
           }
 
       


I feel i am not using it right but I have looked at the docs and I cannot see any issue.

Thanks,

Doomie
Reply


Messages In This Thread
issue with uploader - by doomie22 - 04-07-2016, 07:12 AM
RE: issue with uploader - by cartalot - 04-07-2016, 01:36 PM
RE: issue with uploader - by doomie22 - 04-07-2016, 01:52 PM
RE: issue with uploader - by PaulD - 04-07-2016, 04:54 PM
RE: issue with uploader - by doomie22 - 04-08-2016, 12:28 PM
RE: issue with uploader - by PaulD - 04-08-2016, 12:37 PM
RE: issue with uploader - by cartalot - 04-08-2016, 12:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB