lundi 3 août 2015

Display an image stored in mySQL database with PHP

I have a database which contain blob images. I want to display them in a webpage. I'm using the following php code to get the image. But it didn't work properly.

<?php
        while($row=mysql_fetch_array($results))
        {?>
            <tr>
               <td><img src="<?php echo $row["image"]?>" height="200" width="250"></td>
            </tr>
            <?php
        }?>

With this code I'm getting a webpage like this.

enter image description here

Where I have to do the correction to my code.




Aucun commentaire:

Enregistrer un commentaire