<?php
//session_start();
include "sysconfig.php";
$id_img=$_REQUEST['id_img'];
$fld_img=$_REQUEST['fld_img'];
$val=$_REQUEST['val'];
$tbl=$_REQUEST['tbl'];
$conn=mysql_connect(CONN_HOST,CONN_USER,CONN_PASS);
mysql_selectdb(CONN_DB,$conn);
$result = mysql_query("SELECT " .$fld_img ." FROM " .$tbl ." WHERE " .$id_img ."=" .$val);
if ($result)
{
$result_array = mysql_fetch_array($result);
header("Content-type: images");
echo $result_array[0];
}
?>
|