I have an image in a database(mysql) which I want to incorporate into stored in a database with a structure of:Bin_Data, Filename, Filesize, Filetype.
when I call it like this:
<?
include("dataincludes/connect.inc");
$query = "SELECT Bin_Data FROM Distributor WHERE Username = 'jimmy'";
$result = @($query);
$data = @MYSQL_RESULT($result,0, "Bin_Data");
Header( "Content-type: image/jpeg");
echo("$data");
?>
it works, but what I want is to have
echo("html>........
then in a table somewhere call it like <td>$data</td>
but when I do this all I get is jibberish.
what's wrong here?