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



$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");
 
$frm  = $_GET['frm'];if ($frm == ""){$frm = $_POST["frm"];}

//Item Picture & Code

if($frm == 2) 
	$query="select customer_card from customer where Customer_Code='".$item_code."'";
else	
	$query="select item_picture from items where item_code='".$item_code."'";

$result=mysql_query($query,$connection);
$row=mysql_fetch_row($result);

$image = $row[0]; 
echo$image;
 
 
?>