Home » Php » Not showing the images which is in <a> tag

Not showing the images which is in <a> tag

Posted by: admin October 18, 2018 Leave a comment

Questions:

Actually I don’t know how to explain my problem.I have a gallery which inside the Album. I have used lightbox to show that images.but when I click Album image it starting from image 4/4 then after click 3/4 and so on.

my galler.php

<?php 
 include("database/connection.php");
 $result=mysql_query("SELECT t1.image,t1.name,x from Album_image t1 LEFT JOIN(SELECT GROUP_CONCAT(DISTINCT image) as x,aid from Gallery_image GROUP by aid) t2 on t1.aid = t2.aid ORDER BY t1.aid DESC");
 while ($row1= mysql_fetch_array($result)) { 
?>
<div class="col-md-4 menu-grid wow bounceInDown" data-wow-delay="0.3s">
    <?php $rowmain=explode(',', $row1[2]);
    foreach ($rowmain as $image) {?>
    <a href="admin/gcatch/<?php echo $image;} ?>" data-lightbox="<?php echo $row1[1] ?>">
    <img src="admin/acatch/<?php echo $row1[0] ?>" alt="" class="img-responsive">
    </a>
    <h3><?php echo $row1[1]?></h3>                  
</div>
<?php }?>
Answers: