0
I have a gallery of images loaded dynamically, where the user searches for the category and the system loads the relative images. Below each of the uploaded images has a button, which when clicked, the image referring to the button should be displayed in a div on the new page.
Picture of the Buttons I referred to:
My question is how to do this.
VIEW where the gallery with the images is loaded:
<div class="container-galeria row d-flex justify-content-center">
<?php foreach ($listagem as $foto) : ?>
<div class="card mx-3 my-3" style="width: 18rem;">
<img class="card-img-top" src="<?php echo base_url(); ?>assets/upload/<?= $foto['caminhoImagem']?>" alt="<?= $foto['tituloImagem']?>">
<div class="card-body">
<h5 class="card-title"><?= $foto['tituloImagem']?></h5>
<p class="card-text"><?= $foto['dscImagem']?></p>
<a href="" target="_blank" class="btn btn-primary">icone aqui</a>
</div>
</div>
<?php endforeach ?>
</div>
VIEW where the image will be displayed on the new page:
<div class="area-imagem">
<img src="" alt="">
</div>