Welcome Guest, Not a member yet? Register   Sign In
Upload images in database
#1

[eluser]rijobo[/eluser]
Hello,

I'm a beginner in CI and I can find a lot tutorials that explain me how to upload images to the webserver. But I also want to store the path to the image in my database. I'll use this for creating new products in a webshop.
Can anyone tell me how to do this?
#2

[eluser]Ingonyama[/eluser]
After the image has been uploaded use the data() method to get an array of info about the file you just uploaded:

Code:
$upload_data = $this->upload->data();
$upload_data['file_name']; // heres the filename to add this to db

http://ellislab.com/codeigniter/user-gui...ading.html




Theme © iAndrew 2016 - Forum software by © MyBB