View Single Post
Old 02-16-2008, 07:19 PM   #2 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Using header() should be pretty much all you need to do.

For example:

PHP Code:
// ...Connect to the DB server and select your database...

$result mysql_query("SELECT image FROM myTable WHERE image_id = 1");
header("Content-type: image/jpeg");
echo 
mysql_result($result0); 
Assuming that the image data was inserted correctly into your database originally using something like - file_get_contents($_FILES['userfile']['tmp_name']) - to get the image itself, then it should work fine.

Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote