Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/09/2003, 23:17
Avatar de guaton69
guaton69
 
Fecha de Ingreso: septiembre-2002
Ubicación: Santiago - Chile
Mensajes: 330
Antigüedad: 21 años, 7 meses
Puntos: 0
Ayuda paginacion

Hola amigos:

tengo un problema como hago que este php tenga paginacion?? he visto varios como hacer por ejemplo el de webstudio, pero necesito hacer de esta maner [1] [2] y no con siguiente nio anterior solamente asi pero nose como hacerlo ¿me pueden ayudar?
porfavor estoy muy aflijido

Código PHP:
<br> <font color="#CC0000"><strong>Feria 
            de las Pulgas</strong></font> <br> 
            <?php
$link 
mysql_connect("localhost""user""pass");
mysql_select_db("basededatos"$link);
$result mysql_query("SELECT id,titulo,aviso,contacto,precio,direccion,telefono,fecha,email FROM avisos"$link);
if (
$row mysql_fetch_array($result)){
do { 
?>
            <div align="center"> 
              <table width='314' height='73' border='0' cellpadding='0' cellspacing='0'>
                <tr> 
                  <td width='412' height="19"><ul>
                      <li><font size='2'> 
                        <?php $eldia =$row['fecha']; 
        
$ano substr($eldia,0,4);
    
$mes substr($eldia,4,2);
    
$dia substr($eldia,6,2);
    echo 
"$dia-$mes-$ano"
        
?>
                        </font></li>
                    </ul></td>
                </tr>
                <tr> 
                  <td height="18"><blockquote> 
                      <div align='center'><font size='2'><strong><font color='#000000'><?php echo $row['titulo']; ?></font></strong></font></div>
                    </blockquote></td>
                </tr>
                <tr> 
                  <td height="18"><blockquote> 
                      <p><font size='2'><?php echo $row['aviso']; ?></font></p>
                    </blockquote></td>
                </tr>
                <tr> 
                  <td height="18"><font size='2'>Precio: <?php echo number_format ($row['precio']); ?></font></td>
                </tr>
              </table>
              <br>
              <table width='314' height='106' border='0' cellpadding='0' cellspacing='0'>
                <tr> 
                  <td height='12' align='left' valign='top' bgcolor='#990000'><img src='images/dere_sup.gif' width='12' height='12'></td>
                  <td align='right' valign='top' bgcolor='#990000'><img src='images/izq_sup.gif' width='12' height='12'></td>
                </tr>
                <tr bgcolor='#990000'> 
                  <td height='82' colspan='2'><font color='#bbbbbb' size='2'><strong>Contacto: 
                    <?  echo $row['contacto']; ?>
                    <br>
                    <?php if (empty ($row['telefono'])) {
      } else {
       echo 
"Tel&eacute;fono:"$row['telefono']; 
       }
?>
                    <br>
                    <?php if (empty ($row ['email'])) {
      } else { echo 
"E-mail:",$row['email']; 
      }
?>
                    <br>
                    <?php if(empty($row['direccion'] )) {
}  else { 
echo 
"Direcci&oacute;n:"$row['direccion']; 
      }
?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td height='12' align='left' valign='bottom' bgcolor='#990000'><img src='images/dere_aba.gif' width='12' height='12'></td>
                  <td align='right' valign='bottom' bgcolor='#990000'><img src='images/izq_aba.gif' width='12' height='12'></td>
                </tr>
              </table>
              <br>
            </div>
            <hr align="center" width="320" size="1"> 
            <?
} while ($row mysql_fetch_array($result));
} else {
echo 
"¡ La base de datos está vacia !";
}

?>
adios y salu2