Image is not being uploaded into Database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Image is not being uploaded into Database (/showthread.php?tid=70059) |
Image is not being uploaded into Database - kirasiris - 02-14-2018 Hello PHP Code: $slug = str_replace(' ', '-', $this->input->post('title')); I already tried by commenting the $data = array('upload_data' => $this->upload->data($file_name)); just after the else to then use this on my array in the post_image value, and If I do that it throws me an error of post_image cannot be NULL... PHP Code: 'post_image' => $this->upload->data($file_name) Any help? The Code works in general, I mean, it sends the file to the folder, the problem is that is does not upload the picture into the database under the post_image value. What it actually sends is the data inside the file_name variable that is just after initializing the upload config. PHP Code: $file_name = 'post_image'; RE: Image is not being uploaded into Database - InsiteFX - 02-14-2018 PHP Code: 'post_image' => $this->upload->data($file_name); RE: Image is not being uploaded into Database - kirasiris - 02-15-2018 (02-14-2018, 04:40 AM)InsiteFX Wrote: You were right, its working now. |