Paginação !
Estou usando o codigo no meu script assim ja tentei de tudo colocar paginação e nao consegui ! porfavor pessoal me ajudemobrigado . alguem pode resolver isso para min ficarei grato !<?php$host = "localhost";$user = "root";$senha = "";$db= "loja"; $tabela = "produtos";$conn = mysql_connect($host,$user,$senha);$banco = mysql_select_db($db);$tipo = $_GET["ver"];$sql=mysql_query("SELECT * FROM produtos WHERE tipo='$tipo' ORDER BY cod") or die(mysql_error()); echo "<table width=100% border=0 align=center>";$total = mysql_num_rows($sql);?><?php$colunas = "3";?><?phpif ($total>0) {for($i=0;$i<$total;$i++) {if (($i%$colunas)==0) {echo "<tr>";}?><?php$dados = mysql_fetch_array($sql);$nome = $dados["nome"];$descricao = $dados["descricao"];$preco = $dados["preco"];print "<td>";echo "<table border=0 cellpadding=0 cellspacing=0 width=170 bgcolor=#EDF8E0><tr><td colspan=3 bgcolor=#afde8b height=1 width=170 bgcolor=#EDF8E0></td></tr><tr><td bgcolor=#afde8b height=20 width=1></td><td border=0 background=images/fundo-verde.gif height=20 width=160><table class=verde border=0 cellpadding=0 cellspacing=0 width=160><tbody>";echo "<tr>";echo "<td width=10></td><td width=155><b>$nome</b></td><td width=10></td></tr>";echo "</table></td><td bgcolor=#afde8b height=20 width=1></td></tr><tr><td colspan=3 bgcolor=#afde8b height=1 width=160></td></tr><tr><td bgcolor=#afde8b height=20 width=1></td><td height=20 width=160><table class=verde bgcolor=#edf8e0 border=0 cellpadding=0 cellspacing=0 width=160><tr><td colspan=3 height=10 width=160></td></tr>";echo "<tr>";echo "<tr><td width=10></td> <td height=20 width=160>$descricao <br><font color='#FF0000' size='4px'> R$ $preco </font></td> </tr>";echo "<tr><td colspan=3 height=10 width=160></td></tr><tr><td ></td><td height=25 width=140><table class=verde border=0 cellpadding=0 cellspacing=0 width=155>"; echo "<tr><td align=right><a class=verde href=''><b>Assine Já</b></a></td></tr></table>";echo "</td><td width=10></td></tr><tr><td colspan=3 height=10 width=160></td></tr></table></td><td bgcolor=#afde8b height=20 width=1></td></tr><tr><td colspan=3 bgcolor=#afde8b height=1 width=160></td></tr></table>";}} else {echo "<br><br> <div align=center>Nenhum produto disponivel nessa categoria aguarde em breve. </font></div></table>";}?></table></table>Discussão (1)
Carregando comentários...