Welcome Guest, Not a member yet? Register   Sign In
need how to store image that is been uploaded in the database with attaching some description and then retrieving like a
#2

[eluser]Teks[/eluser]
The first part of your question - that is, how to get the file from the user and store it in the database - is partially answered in the User Guide, here:

File Uploading Tutorial

The tutorial shows you how to save the uploaded images into a directory, not a database. However, storing the file in a database - instead of a directory - is trivial, once you know how to process the uploaded data. Just place the uploaded data into a BLOB/BINARY field in your database.

Note also that the code used in the above tutorial can be made even simpler if you use the functions available in the Form Helper:

Form Helper Documentation

I am, however, having the same problem as you, in regards to redisplaying the saved file(s). My script is saving the image file(s) in the database, but now I want to redisplay them inside a view. What is the procedure for that?

If one of the more experienced CodeIgniter developers could give us some guidance, I would be most thankful!


Messages In This Thread
need how to store image that is been uploaded in the database with attaching some description and then retrieving like a - by El Forum - 11-23-2008, 03:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB