Very good to all dear friends, I hope you help me with this. I have a voting system I LIKE OR I DO NOT LIKE and I wanted to put it on every item of the boostrap carousel. I have a database in which is a ID-MEGUSTA-NOMEGUSTA-TITULO in which the megusta keep the number of click that they gave to that button. Well the thing is that I just want to show the record 1 in the item of the carousel, the record 2 in the next item and so on. I already have it finished, but the problem is to put it in each item. I'm not so sure if I can do it in the while putting the item. If you want the program, they ask me for it. If you help me pass it as I ask, I'll leave the link to download the complete system already modified. Thanks!
<div class="contenedor"><!--Aqui la programacion-->
<?php
require_once("config.php");
$posts=$db->query("select * from posts order by id");
$contador=0;
if ($filas=$posts->fetch_array())
{
do
{
$contador++;
?>
<h3><?php echo utf8_encode($filas["plato"]);?></h3>
<ul class="votos">
<li class="voting_btn up_button" data-voto="likes" data-id="<?php echo $filas["id"]; ?>"><span><?php echo $filas["likes"]; ?></span></li>
<li class="voting_btn dw_button" data-voto="hates" data-id="<?php echo $filas["id"]; ?>"><span><?php echo $filas["hates"]; ?></span></li>
</ul>
</div>
<?php
}
while($filas=$posts->fetch_array());
}
else echo "<h3>No hay entradas disponibles.</h3>";
?>
<!-- Aqui esta el Carousel -->
<div id="owl-demo" class="owl-carousel text-center">
<div class="item">
<img class="lazyOwl" src="images/gallery-1.jpg" alt="Tout dé Cake">
<p style="font-size: 25px; color:red;">Hola</p>
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-2.jpg" alt="Tout dé Cake">
<p style="font-size: 25px; color:red;">Hola</p>
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-3.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-4.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-5.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-6.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-7.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-8.jpg" alt="Tout dé Cake">
</div>
<div class="item">
<img class="lazyOwl" src="images/gallery-9.jpg" alt="Tout dé Cake">
</div>
</div>
Friends have already left!