I understand about the PHP function, however it requires a filename to work. The images are stored in a database table and are extracted and stored in a variable, thus:
$sqlquery = "SELECT image FROM tblproducts WHERE id = $productid";
$dataresult = mysql_query($sqlquery);
while ($datarow = mysql_fetch_array($dataresult)) {
$productimage= $datarow['image'];
}
mysql_free_result($dataresult);
header('Content-Type: image/jpeg');
print $assessmentimage;
The above code prints the image.
Any other ideas? Thanks