Código PHP:
<?php
$link = mysql_connect("www.equiposelsol.com", "miguelret", "jufepaca") or die(mysql_error($link));
mysql_select_db("dbequipelsol", $link) or die(mysql_error($link));
$sql="SELECT * FROM fotos";
$conn = mysql_query($sql, $link) or die(mysql_error($link));
$picrow=mysql_fetch_array($conn);
$mime = $picrow['mime'];
header( "Content-type: $mime" );
echo "$picrow[foto]";
?>
Código PHP:
<?php
$link = mysql_connect("www.equiposelsol.com", "miguelret", "jufepaca") or die(mysql_error($link));
mysql_select_db("dbequipelsol", $link) or die(mysql_error($link));
$sql="SELECT * FROM fotos";
$conn = mysql_query($sql, $link) or die(mysql_error($link));
while($picrow=mysql_fetch_array($conn)){ ?>
<tr>
<td><img src="muestra_imagen.php?idfoto=<?php echo $picrow['idfoto']; ?>" /></td>
</tr>
<?php } ?>