- <?php 
- require_once("funciones.php"); 
- if (!@$cn=fnconnect()) 
- { 
-     echo "Problema al conectar el servidor o base de datos"; 
-     return; 
- } 
- ?> 
-   
- <html> 
- <head> 
- </head> 
- <body> 
-  <p> 
- <table align= "center" border = 0> 
- <tr><td><font face="Comic Sans Ms"><b>Dato a Buscar:</b></font></td><td><input type="text" name="txtdato"></td><td><input type="submit" name="Buscar" value="Buscar"></tr> 
- </table> 
- <table align="center" border = 0> 
- <td><input type="radio" name="r1" id="r1" value="1">Nombre</td> 
- <td><input type="radio" name="r1" id="r1" value="2">Autor</td> 
- <td><input type="radio" name="r1" id="r1" value="3">Editorial</td> 
- </table> 
- </body> 
- </html> 
-   
-   
- <?php 
- $limit=1; 
- if (!isset($_GET["pagina"])) 
- { 
-     $ini=0; 
-     $pag=1; 
- } 
- else 
- { 
-     $pag=$_GET["pagina"]; 
-     $ini=($pag - 1) * $limit; 
- } 
-     $sql="select * from libros"; 
- //calculo el total de paginas 
-     $total_pag=ceil($total / $limit); 
-   
-     $sql .=" limit $ini,$limit"; 
-   
- { 
-     echo $fila["nom_lib"]." | ".$fila["aut_lib"]."<br>"; 
- } 
- if ($total_pag > 1) 
- { 
-     for ($i=1;$i<=$total_pag;$i++) 
-     { 
-         if($pag == $i) 
-         { 
-             echo($pag . " "); 
-         } 
-         else 
-         { 
-             echo(fnlink("default.php?op=1&pagina=".$i,"","",$i)); 
-         } 
-     } 
- } 
-