Login   Register  
PHP Classes
elePHPant
Icontem

File: viewimage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2012-11-01 13:32
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];
}
?>