well this doesn't really answer your question, but why do you want to store image in db? as I know, it's not such a good idea..
Personally i don't think it's such a bad idea, as long as your site isn't visited as much. The reason it's a bad idea is that it's a really slow process reading so much data from a database.
BUT for security reasons, this could very well be a good idea since the only way you can access the pictures, is through a server side language.
If possible, it's better to store images and files over you webroot, and then access them stil through php, this is a quicker way to do it, and you can still stop people from leeching and that kind of things.
TSDN members are expected to write their own code. We're happy to help you out if you have specific questions, but you can't realistically expect someone to do your coding for you on a free forum.
When creating your table create all the fields you need, as well a MEDIUMBLOB for storing you image.
When uploading the image specify you SQL-query so that the variable containing the image is sent in to the database just as you would send a string or integer. Pretty simple, just treat it as any other entry.
Retrieveing the image is a bit more complicated, are you going to need help with this as well?
Comment