<?php

include("config.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");

$PayId = $_GET['PayId'];

$query = " Select Payment_Image as PaymentImage From PaymentMethods Where Payment_Id = '".$PayId."'"; 
$result = mysql_query($query,$connection) or die(mysql_error());

while($row = mysql_fetch_array($result,MYSQL_ASSOC)){
	$PaymentImage = $row['PaymentImage'];
} 

header('Content-type: image/jpeg');
header('Content-type: image/bmp');
header('Content-type: image/gif');
header('Content-type: image/png');

echo $PaymentImage;




?> 