I have to take an image out of a mysql db (yeah, i know "don't!" but no choice as the app is mainly written in ASP and I am doing some post insertion processeing in php...
Basically I need to extract the image from the DB, thumbnail it, and stick it back in...I am testing the extraction part but only end showing the binary cod efor the image not the image itself...so the extract works...have set the header, but still no joy...
All images are jpgs, so the image type header is not the issue
any ideas?
Bastien
Cat, the other other white meat
Basically I need to extract the image from the DB, thumbnail it, and stick it back in...I am testing the extraction part but only end showing the binary cod efor the image not the image itself...so the extract works...have set the header, but still no joy...
Code:
header("Content-type: image/jpeg");
if (($results)&&(mysql_num_rows($results)==1)){
//we have the image
while ($row=mysql_fetch_array($results)){
$img = $row['evidence'];
}//end while
}//end if
echo "<p><img src='$img'></p>";
All images are jpgs, so the image type header is not the issue
any ideas?
Bastien
Cat, the other other white meat