-2

Possible Duplicates:
Inserting images into a database
Store images in database or on file system

Hi,

I want to insert product image to database using php. please help me out.

Community
  • 1
  • 1
Behind the screen
  • 71
  • 1
  • 5
  • 16

2 Answers2

1

Are you sure you really want to store images in the database? Its faster to upload the image to the file system and store its location in the database, faster in both upload and accessing.

If however it is storing images as binary in the DB for security for example:

Google Has Many Answers

Like:

Tutorial Storing Images MySQL PHP

Scoobler
  • 9,696
  • 4
  • 36
  • 51
0

There are two ways to do this.

  1. Insert Binary data for the image.
  2. Insert location of image into database and keep image file at a place accessible by your application.
Shamim Hafiz - MSFT
  • 21,454
  • 43
  • 116
  • 176