Re: JPG Images from database to filename.jpg

From: Date: Fri, 16 Nov 2001 20:04:55 +0000
Subject: Re: JPG Images from database to filename.jpg
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-74924@lists.php.net to get a copy of this message
Sorry, couple post-Post changes.. The initial query should have been:
    $sql = "SELECT Image,Width,Height FROM Images WHERE ID='$ID'";
The an echo of the UPDATE sql now looks like this: UPDATE Images SET Thumbnail=' Warning: Supplied argument is not a valid Image resource in /home/mike/wtoaction/public_html/caravan2001/edit_image_handler.php on line 34 ÿØÿà\0JFIF\0\0\0\0\0\0ÿþ\0 Warning: Supplied argument is not a valid Image resource in /home/mike/wtoaction/public_html/caravan2001/edit_image_handler.php on line 40 ' WHERE ID=95ReThumbnailing Successful This is the essential part of the script which is displaying the data now: $sql = "SELECT Format,Image FROM Images WHERE ID=$ID"; $res = dbi_query ( $sql ); if ( $res ) { if( $row = dbi_fetch_row ( $res ) ) {
    Header("Content-type: image/jpeg");
    echo $row[1];
} dbi_free_result ( $res ); } The image looks just fine here: http://www.wtoaction.org/caravan2001/image.php?ID=95 I must be missing something really simple.. Mike

« previous php.general (#74924) next »