Question: display img stored in mySQL DB in the table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
skyandfish
Forum Newbie
Posts: 3
Joined: Sun Dec 29, 2002 11:57 pm

Question: display img stored in mySQL DB in the table

Post by skyandfish »

hi, I got a strange question:

I inserted a img in to a table, and the img is stored in the mySQL DB.
E.g, the img size is 100*100, and the code is very simle:

<table width="100 height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="100">
<?php
echo "<img src=\"showimg.php" width=\"100\" height=\"100\" border=\"1\">";
?>
</td>

</tr>
</table>



showimg.php is a simple php program which display a img stored in the mysql db.

My question is:

The img could be display normally, but there always a small space in the table cell under the img. i.e., The cell is enlarged a little. The cell is 100*100, same as the img size. So I don't know why
there is such a space (about 5 pix high).


If i insert a img from the local drive in the table. Of course everythink is ok. The cell is filled fully with the img.
Post Reply