I am trying to display image files stored in my mysql. It displays alright as a direct php echo, but when i put it in an <img.../> src attribute... I get a cross. The following is the code snippet;
...
$query = mysql_query("SELECT pid, imgdata FROM pix WHERE pid='2'");
$row = mysql_fetch_array($query);
$content = $row['imgdata'];
header('Content-type: image/jpg');
//echo $content;
?>
<html>
<title>Sample Pix</title>
<body>
<table border="0" cellspacing="4" cellpadding="5">
<tbody>
<tr>
<td><img src=$content width="200" height="170"/>
<!-- <img trial1 src=" echo $row['$content']; ?> trial2 echo $content;--></td>
</tr>
</tbody>
</table>
</body>
</html>
Any help that will help me display these images quickly in the attribute with the attribute measurement will be very appreciated very much.