ok - so I have managed to upload some images to a db but am struggling to get them back out and onto my page.
If I use just php coding ie
<?
require("config.inc");
$sql = "SELECT src, alttext FROM images WHERE id=$id";
$result = @($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result)) {
$src = $row['src'];
$alttext = $row['alttext'];
}
echo "$src";
?>
.....the image is displayed, but if I try and embed this code into an html table, for example all that is displayed is the raw binary data !
What am I doing wrong ?
Many thanks