Storing and displaying images from MySQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Skipper02
    Sergeant

    • Jun 2008
    • 25

    Storing and displaying images from MySQL

    Can anyone please provide me the correct code snippets for storing and then retrieving and displaying images from mysql database? I have read relevant postings in the different forums as well as searched the internet but none of the solutions seem to work.
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: Storing and displaying images from MySQL

    Theres no small code snippet to do this. You need a script that will read the image file and add its contents to the database, as well as retrieve information about the image and store that as well. And then also have code to retrieve the data, and inject the correct information into a header of a file to print the image instead of the gibberish characters that makes up an image when printed in text. Also more to list the images if you don't plan on manually inserting them into pages.

    Heres a tutorial on it, hope it helps

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • k_pink
      Private

      • Jul 2008
      • 2

      #3
      Re: Storing and displaying images from MySQL

      Originally posted by Watdaflip View Post
      Theres no small code snippet to do this. You need a script that will read the image file and add its contents to the database, as well as retrieve information about the image and store that as well. And then also have code to retrieve the data, and inject the correct information into a header of a file to print the image instead of the gibberish characters that makes up an image when printed in text. Also more to list the images if you don't plan on manually inserting them into pages.

      Heres a tutorial on it, hope it helps
      http://www.codewalkers.com/c/a/Datab...in-Database/2/
      thanks

      Comment

      Working...
      X