Location: PHPKode > scripts > Secure Image Uploading and Resizing > fetch_image_frm_db.php
<?php
require('conn.php'); /*important, change in conn.php to your settings*/

$id=$_GET['pid'];

$query = "SELECT * FROM upload WHERE ID=$id";

$result=mysql_query($query) or die('Error, query failed'.mysql_error()); 
$row=mysql_fetch_array($result);

//imagecreatefromjpeg( $row['name']);
header("Content-type:image/jpeg");
stripslashes ($row['content']);

echo $row['content'];

    
  
?> 

Return current item: Secure Image Uploading and Resizing