View Single Post
  #2 (permalink)  
Old 08-01-2007, 10:39 AM
molotov molotov is offline
Novice
Join Date: Jul 2007
Posts: 37
iTrader: (0)
molotov is on a distinguished road
I just finished doing something similar to this for a client:

Someone that wants to upload images submits the file via a php form. PHP then determines if the image is larger than a specified size, if it is, it is scaled and resampled. The client wants to have all the images IN the database, but I also have to keep a copy in the filesystem to make Flash happy. I store the image id, image title, description, human-readable-file-size, safe filename, image data, and mime-type in the database, and then use the safe filename to call the image from the filesystem for flash. I've also got a script that when passed an ID, regenerates the image from the database. Pulling images from the database is a little confusing at first, so I can help with that. Displaying random images is a cinch, and having an image of the day is also easy.


Before anyone asks, calling an image in flash like this doesn't work for me:
Code:
<img src="image.php?id=9">

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to molotov For This Useful Post:
HelloWorld (08-01-2007)