There is a php code of the gallery, in it the address of the picture is taken from the database. I need to create a separate page with a picture (there will be comments and the number of views on it in the future). I can not understand how to compare the click from the gallery page with the transition to another page - the picture page (how to make the same picture on the full page which was clicked)

<div class='col-sm-4 col-xs-6 col-md-3 col-lg-3'> <a class="thumbnail" rel="" href="uploads/<?php echo $image['image']?>" target="_blank"> <img class="img-responsive" alt="" src="uploads/<?php echo $image['image'] ?>" /> <div class='text-center'> <small class='text-muted'><?php echo $image['title'] ?></small> <p class='text-muted'>Размер: <?php echo $image['size'] ?></p> <p class='text-muted'>Адрес: <?php echo $image['address'] ?></p> </div> <!-- text-center / end --> </a> </div> <!-- col-6 / end --> 

    1 answer 1

    There must surely be some identifier (ID) in the database - substitute it, and during the transition check if the picture exists, if there is access to it, etc.

    • and how to match the same id on different pages? - stiv
    • Well, logically, id should be taken from the database. If the id is unique (and it should be unique) - search the database, find the desired image and work. You still have to attach comments to the images, so the unique identifier should be. - ya.ymer