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.
Storing and displaying images from MySQL
Collapse
X
-
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
-
-
Re: Storing and displaying images from MySQL
Originally posted by Watdaflip View PostTheres 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/
Comment
-
Comment