how to store image in database?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aspirant12345
    New Member
    • Aug 2013
    • 1

    #1

    how to store image in database?

    i have build a small website in my PC using PHP and mysql.
    it is a social networking site. everything was working fine...... but i noticed that whenever i am saving a profile picture, it is being saved in that folder in which all other php files are stored. so, i reached on to a conclusion that if i create too many users and give them a profile picture each then that folder will be too messy....
    My problem lies here......
    i was thinking that i am storing my images in mysql databases but in reality it is not being saved there...... plz tell me , how would i make these storage efficient in terms of numbers?

    I am using xampp on wnidows 7......
  • Exequiel
    Contributor
    • Jul 2012
    • 288

    #2
    when you are going to upload an image or any files, you need to create a program that will automatically generate a unique name for every files that you are going to save, the file name must be unique every time you are going to upload, example: filename_121212 .jpg, filename_234345 345.jpg,

    Comment

    • Exequiel
      Contributor
      • Jul 2012
      • 288

      #3
      Visit this link. . http://bytes.com/topic/php/answers/9...ideos-database
      Then download this one, it is a sample uploading in php. http://www.mediafire.com/download/1i...load_video.rar

      Comment

      Working...