I am currently retrieving binary data (small gifs) stored in a MySQL database, but when I do I am unable to put any text on the same page. I assume this is because of the Header("content-type:image/gif") tag.
How do I create a second connection to the web server within this same page to also display simple HTML ? Or where in this code can i put HTML to get to display?
Thanks for any help.
My code is:
<?php
@MYSQL_CONNECT ('localhost", "root", "root");
@mysql_select_Db("test");
$query = "SELECT gif,filetype FROM bin_data WHERE id=$id";
$result = MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,"gif");
$type= @MYSQL_RESULT($result,0,"filetype");
Header("content-type: $type")
echo $data;
?>