Unless there is a compelling reason for storing the image in
the database, I'd suggest you store the image in an image directory
and store the filename of the image in the database. For example,
if you store myImage.jpg into a directory named imageDir, you can
store the filename "myImage.jpg" in the database. To display the
image, retrieve it as the variable showImage and display it using
<IMG SRC="imageDir\#showImage#" ... >
There is some debate as to what the recommended approach
would be.
I am of the opinion that storing the image itself in the
database, while technically possible, is not the best solution for
most of the scenarios I have come across.
As has been suggested, I also recommend storing the image
itself in a priviledged directory on your server, and then storing
the filename to that image in your database.
Are you allowing end users to upload images, and then
referencing those images on a page, or are you, as the developer,
maintaining the images and displaying them?
That depends on how your database is structured. If you
anticipate mutlipe images per record in your DB, it might make
sense to create a separate table with a one-to-many relationship
between the main table and your images table. That would allow you
the flexibility to store as many images as you want that relate to
a single record in your main table.