PHP Classes

File: viewimage.php

Recommend this page to a friend!
  Classes of saulo hernandez   DBGridMx   viewimage.php   Download  
File: viewimage.php
Role: Auxiliary script
Content type: text/plain
Description: show image image file in html
Class: DBGridMx
Show and manipulate MySQL records in a table grid
Author: By
Last change:
Date: 12 years ago
Size: 466 bytes
 

Contents

Class file image Download
<?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];
}
?>