1
The code below is being used to show images that are in the BD, however it is not passing the photos:
<div id="conteudo2" class="row">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel" class="col-sm-12 col-md-6">
<div class="carousel-inner">
<!-- <div class="carousel-item active btn-add-more">
--> <!-- <i class="material-icons" for="uploader-file">add_photo_alternate</i> -->
<!-- <h1 style="cursor: default;">Adicionar mais imagens</h1>
--> <!-- <label class="btn btn-primary" for="uploader-file" style="margin-top: 15px;">
Adicionar
</label> -->
<?php
$imagemApicultor = null;
try {
$prepared = $conexao_pdo->prepare("SELECT `imagem`, `titulo`, `descricao` FROM carousel_images WHERE `cod_apicultor` = :cod_apicultor order by cod desc");
$codApicultor = $_SESSION["token"];
$prepared->bindParam(":cod_apicultor", $codApicultor);
$prepared->execute();
if($prepared->rowCount() > 0) {
$data = $prepared->fetchAll();
for($i = 0; $i<sizeof($data); $i++) {
?>
<div class="carousel-item active">
<div class="localdeimagem" style="width:100%;height:391px;background-position:center;background-size: cover;background-image: url('<?php echo 'api/'.$data[$i]["imagem"]; ?>');">
</div>
<div class="carousel-caption d-none d-md-block">
<h5><?php echo $data[$i]["titulo"] ?></h5>
<p><?php echo $data[$i]["descricao"] ?></p>
</div>
</div>
<?php
}
}
} catch(PDOException $e) {
print $e->getMessages();
die();
}
?>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Which version of bootstrap? This carousel is the original in bootstrap or you used another model?
– hugocsl
version 4.1.3. It is his original version
– Nathi
I think it has something to do with "active," but I can’t identify the problem
– Nathi