Announcement

Collapse
No announcement yet.

Storing and displaying images from MySQL

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

  • 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.

  • #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
    Codewalkers.com was established in 2002 by a group of coders who wanted to assist others learn and improve their programming abilities.

    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


    • #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