I need to go to the database to fetch the img and go showing it in every <li> </li>
of the carousel, however I had to leave it automatic, since it's a lot of photos, is there any way?
<div id="wrapper">
<div id="carousel" class="carousel">
<div class="call-to-content wow fadeInUp">
<h3>fileira 1</h3>
</div>
<a class="nav prev" href="#"></a>
<div class="carousel_items_holder">
<ul class="carousel_items">
<li>
<a href="#">
<?php
$img=mysql_query("SELECT * FROM arquivo WHERE id_pessoa = 1 ORDER BY visu DESC limit 0,1 ")
or die("Impossível executar a query");
$nome=mysql_query("SELECT nome, id_pessoa FROM arquivo WHERE id_pessoa = 1
ORDER BY visu DESC limit 0,1") or die("Impossível executar a query");
while($row=mysql_fetch_object($img)) {
echo "<img src='getImagem.php?PicNum=$row->codigo' \">";
}
while($row=mysql_fetch_array($nome)) {
$c_nome = $row["nome"];
$c_id = $row["id_pessoa"];
}
?>
</a>
<div class="center">
<p>
<?php
echo "<a href='perfil.php?id=$c_id'> $c_nome </a>";
?>
</p>
</div>
</li>
<a class="nav next" href="#"></a>
</div>
</div>
Connection file
<?php
$host = "localhost";
$username = "root";
$password = "";
$db = "imagem";
$link = mysqli_connect($host,$username,$password) or die("Impossível conectar ao banco.");
@mysqli_select_db($db) or die("Impossível conectar ao banco");
? >
With this code above, I manually enter, however needed automatic, do you have any way?