Location: PHPKode > scripts > Create Your Own Directory > cms/includes/print.php
<?php
header("Content-type:image/jpeg/gif"); // act as a jpeg file
//header("Content-Transfer-Encoding: binary\n");
error_reporting(0);
require_once "../auth/config.php";
$link = mysql_connect($hostname, $username,$password);
if($link)
{
	$dbcon = mysql_select_db($dbname,$link);
}
$id=$_GET[cnt];

//header("Content-length: " . strlen($data) . "\n");
//header("Content-type: application/jpeg");

$MainSQL="SELECT img FROM images where imgid=$id ";
//header("Content-type:image/doc"); 
$result = mysql_query($MainSQL,$link);
$row =mysql_fetch_array($result,MYSQL_BOTH);
$data = $row[0];
//send file contents

print $data;
?>
Return current item: Create Your Own Directory