i'm using the below script all is working fine, but i was wondering if it was possible to embed this into my web page instead of calling if from another.
for example
if($id) {
$query = "select bin_data,filetype from covers 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 "<img src=$data>";
};
current code to add to webpage
<img src=gettitle.php?id=$id>
code for gettitle.php
if($id) {
$query = "select bin_data,filetype from covers 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;
};