<?php
include("config.inc.php");
include("function.inc.php");
session_start();


$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");


$query="Select item_picture from vehicle where vehicle_id = '".$vehicleid."' ";
$result=mysql_query($query,$connection) or die(mysql_error());

$row = mysql_fetch_row($result);
$imagebytes = $row[0];
header("Content-type: image/jpg");

//echo $imagebytes;
$srcc = "data:image/jpg;base64,".base64_encode($imagebytes);
//echo "<image src=\"$srcc\" id='vehicleimg' border=0 width='250px' height='300px' align=center ></image>";
?>