when your php script places the img src refer to another php that actually shows the image.
something like this should work: (this is from memory and i haven't tested it)
#######main.php
<BODY>
<IMG SRC="image.php?id=1">
</BODY>
#######image.php
<?
/ CREATE TABLE pict (id INT AUTO_INCREMENT, data BLO😎; /
mysql_pconnect("localhost","username","password") or die("Not able to connect with Mysql. Reason: ".mysql_error());
$data_result = mysql_db_query("db","SELECT data FROM pict WHERE id = $id") or die("Not able to return data. Reason: ".mysql_error());
$data_row = mysql_fetch_array($data_result);
$data = $data_row[0];
#assume the image is of type gif
header("Content-Type: image/gif");
echo $data;
?>