How can I insert an image in MySQL and then retrieve it using PHP?
I have limited experience in either area, and I could use a little code to get me started in figur
My opinion is, Instead of storing images directly to the database, It is recommended to store the image location in the database. As we compare both options, Storing images in the database is safe for security purpose. Disadvantage are
If database is corrupted, no way to retrieve.
Retrieving image files from db is slow when compare to other option.
On the other hand, storing image file location in db will have following advantages.
It is easy to retrieve.
If more than one images are stored, we can easily retrieve image information.