Tuesday 8 September 2015

Retrieve image when image present in files and image detail present in Database

  <?php
    $qry="select merchant_id,website from merchant where priority > 0 order by priority";
$top=mysql_query($qry);
while($data=mysql_fetch_assoc($top)){ ?>
<a href="http://<?php echo $data[website]; ?>" target="_blank">
<img src="/images/logo/<?php echo $data[merchant_id].'.'.'jpg' ?>" />
</a>
<?php } ?>

No comments:

Post a Comment