Hi,
I can't seem to get this to work. I am calling an image from the dbase. It is a blob in the dbase and the ID# in it is 1. The HTML is below. Thanks...Rich
<html>
<head>
<title>Call data from SQL Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?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) {
@MYSQL_CONNECT("host","user_name","password");
@mysql_select_db("dbname");
$query = "select bin_data,filetype from table_name where id=$id";
$result = @MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,"bin_data");
$type = @MYSQL_RESULT($result,0,"filetype");
header( "Content-type: $type");
echo $data;
<img src="getdata.php3?id=1">
}
?>
</body>
</html>