-3

Description --> I just want to fetch image in my web page from data base i had given BLOB type to database where i am storing image , how do i fetch that image , in this code i am getting small icon of image with corrupted format .

<?php

 $connection = mysqli_connect("localhost", "****",  "******","****");
 $find_data =mysqli_query($connection,"SELECT * FROM ashish " );
 while($row = mysqli_fetch_assoc($find_data)){

 $current=$row['weblink'];$asdf=$row['webrate'];$imag =$row['weblogo'];

 $ima =$row['weblogo'];

 }

 ?>
 <form action="ashishdb" method="post" enctype="multipart/form-data">
 <div><p>WebSite Link :<input type="text" name="weblink">    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     Websites Rating : <input type="text" name="webrate">   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Website Logo : <input type="file"   name="weblogo"></p>

  <p align="center"><input type="submit" value="Submit" name="btn_file"></p>

  </div>
   <table style="width:100%">
   <tr>
   <th>A</th>
   <th>A</th>
   <th>A</th>
   </tr>
   <tr>
   <td><?php echo $current ?></td>
    <td><?php echo $asdf  ?></td>

     <td><img src=<?php echo $ima ?> ></td> 


        </tr>
       </table>
     </form>
     </body></html>

1 Answers1

-2

if your "ashish" table "weblogo" column contains the image's path or url, you can try :

<img src="<?php echo $ima; ?>" >

or

<img src="<?=$ima?>" >