Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/08/2015, 11:26
flashtrix
 
Fecha de Ingreso: noviembre-2004
Mensajes: 249
Antigüedad: 19 años, 5 meses
Puntos: 1
como le pongo un paginador php a esto

Hola, he leido manuales, he buscado en el foro, he visto tutoriales y descargado ejemplos para ver como adapto a este ejemplo un sistema para paginar los resultados de modo que se puedan ir viendo todos pero con un paginador... Gracias totales al que me pueda ayudar...

Código PHP:
<html>
<head>
<title>titulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <? 
$tabla 
"mitabla";
$username "miusuario";
$password "micontrase";
$dbName   "mibd";
$hostname "localhost";

mysql_connect($hostname,$username,$password) or
print 
"Error en la Conexión";

mysql_select_db("$dbName") or
print 
"Error en la Base de datos";

$consulta "select * from $tabla WHERE estado ='1' order by id DESC ";
$resultado=mysql_query($consulta);
$numregistros=mysql_numrows($resultado);
////////////////////////////////////////////////////////////////////////
?>
<style type="text/css">
a:link {
    text-decoration: none;
    color: #000000;
}
a:visited {
    text-decoration: none;
    color: #000000;
}
a:hover {
    text-decoration: none;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}
body,td,th {
    font-size: 10px;
    padding: 12px;
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: left;
}
</style>
</head>
<body>
<table width="602" height="270" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <?
    $i
=0;
    while (
$i 3)
     {
      
$id=mysql_result($resultado,$i,id);
      
$titulo=mysql_result($resultado,$i,titulo);
      
$texto=mysql_result($resultado,$i,texto);
      
$fecha=mysql_result($resultado,$i,fecha);
      
$estado=mysql_result($resultado,$i,estado);
      
$imagen=mysql_result($resultado,$i,imagen);
      
?>
    <td height="2" colspan="2"></td>
  </tr>
  <tr>
    <td height="42" colspan="2"><font color="#119151" size="2" face="Arial, Helvetica, sans-serif"><strong><a href="noti.php?id=<? echo $id ?>"><? echo strtoupper($titulo)?></a></strong></font></td>
  </tr>
  <tr>
    <td width="260" height="198"><p align="center"><font color="#00803A" size="2" face="Arial, Helvetica, sans-serif"><strong><a href="noti.php?id=<? echo $id ?>"noti.php?id=<? echo $id ?>"><img src="img/<? echo $imagen?>" name="roll" width="236" height="174" border = "0" align="middle"></a></strong></font><font size="2" face="Arial, Helvetica, sans-serif"> </font></p></td>
    <td width="342"><div align="right">
      <p align="justify"><font size="2" face="Arial, Helvetica, sans-serif">
        <?
          $rest 
substr($texto01500); 
          
?>
      </font></p>
      <p align="justify"><font size="2" face="Arial, Helvetica, sans-serif">
        <?  
               
echo strip_tags($rest);
              
?>
      </font><font color="#00803A" size="2" face="Arial, Helvetica, sans-serif"></font></p>
    </div></td>
  </tr>
  <tr>
    <td height="25" colspan="2"><hr color="#119151" size="1" noshade></td>
  </tr>
  <?
       $i
++;
       }
     
?>
</table>
</body>
</html>