Dear sdjensen,
This is the code I tried. The comment following the code
Thanks a lot
Happy New Year !
<?php
// getdata.php3 - by Florian Dittmer <dittmer@gmx.net>
// Example php script to demonstrate the direct passing of binary data
// to the user. More infos at http://www.phpbuilder.com
// Syntax: getdata.php3?id=<id>
if($id) {
// you may have to modify login information for your database server:
@MYSQL_CONNECT("localhost","root","");
@mysql_select_db("binary_data");
$query = "select bin_data,filetype, filename from binary_data where id=$id";
$result = @MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,"bin_data");
$type = @MYSQL_RESULT($result,0,"filetype");
$filename = @MYSQL_RESULT($result,0,"filename");
Header( "Content-type: $type");
//echo $type; echo '<br>';
//echo $data;
echo '<table border="1">';
echo '<tr>';
//In this case it returns empty image
echo "<td><img src=\"getdata.php?id=11\" alt=\"image 11\" align=center width=115 height=150></td>";
// In this case it return Binary code
//echo "<td> $data</td> ";
echo '</tr>';
echo '</table>';
};
?>