Output Image from Db to Browser

From: Date: Mon, 17 Jan 2005 22:31:00 +0000
Subject: Output Image from Db to Browser
Groups: php.windows 
Request: Send a blank email to php-windows+get-25362@lists.php.net to get a copy of this message
I am trying to output a JPG image to the browser without creating a file. I have tried several things but nothing seems to work. I sure could use a whole lot of help right now! LOL Going crazy trying to figure this out. But I know there are PHP gurus out there that will have the answer in 2 seconds. Hopefully I'll be at that level someday too! The image comes from a MySQL Blob. The closest I get is a string of garbage on the browser display. I cannot get it to display a pictures. Suggestions, comments, help, almost anything is appreciated. PLEASE help me! Project due in a week. Thanks in advance. Mike if( mysql_num_rows($result) == 1 ) { //header('Content-type: image/*'); $fileContent = mysql_result($result,0); //,$blobfield); echo $fileContent; //$theimage = imagecreatefromstring ($fileContent); //echo imagejpeg ( $theimage);

« previous php.windows (#25362) next »