I made an administrative page where I have entered the information for books and their position (1st, 2nd place ...) in a form, but I can not retrieve the information I need from the database. My need is that, from your position, I put the data in html:
<article id="top">
<?php
include "acessoResponsivo.php";
$comando="select * from tb_top";
$matriz=mysql_query($comando);
$linha=mysql_fetch_array($matriz);
$posicao=$linha["posicao"];
if ($posicao=="1") {
?>
<h2>Top mais lidos</h2>
<div id="topum" class="numeracao">
<?php echo '<img src="img/' .$linha["imagemtop"]. '.jpg"> <br/> '; ?>
<h4 class="num">1</h4> <br> <?php echo '<p class="toptitulo">'.$linha["toptitulo"].'</p> '; ?></div>
<?php
}
//__________________________________dois_____________
else if ($posicao=="2") {
?>
<div id="topdois" class="numeracao">
<?php echo '<img src="img/' .$linha["imagemtop"]. '.jpg"> <br/> '; ?>
<h4 class="num">2</h4> <br> <?php echo '<p class="toptitulo">'.$linha["toptitulo"].'</p> '; ?></div>
<?php
}
//__________________________________tres_____________
else if ($posicao=="3") {
?>
<div id="toptres" class="numeracao">
<?php echo '<img src="img/' .$linha["imagemtop"]. '.jpg"> <br/> '; ?>
<h4 class="num">3</h4> <br> <?php echo '<p class="toptitulo">'.$linha["toptitulo"].'</p> '; ?></div>
<?php
}
//__________________________________quatro_____________
else if ($posicao=="4") {
?>
<div id="topquatro" class="numeracao">
<?php echo '<img src="img/' .$linha["imagemtop"]. '.jpg"> <br/> '; ?>
<h4 class="num">4</h4> <br> <?php echo '<p class="toptitulo">'.$linha["toptitulo"].'</p> '; ?></div>
<?php
}
//__________________________________cinco_____________
else if ($posicao=="5") {
?>
<div id="topcinco" class="numeracao">
<?php echo '<img src="img/' .$linha["imagemtop"]. '.jpg"> <br/> '; ?>
<h4 class="num">5</h4> <br> <?php echo '<p class="toptitulo">'.$linha["toptitulo"].'</p> '; ?></div>
<?php
}
?>
</article>