Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/06/2004, 09:16
omoranya
 
Fecha de Ingreso: junio-2004
Mensajes: 19
Antigüedad: 19 años, 11 meses
Puntos: 0
Hola que tal
mirar este codigo porfavor
me dice una paranoia muy rara un unexcepted T_else
Código PHP:
<?
$base
="biblioteca";
$tabla="libros";
$conexion=mysql_connect("localhost","","");
mysql_select_db($base,$conexion);

$busc=$_GET['buscar'];
$condic=$_GET['condicio'];

if (
$condic=='Autor')
{
$resultadomysql_query("SELECT REGISTRO,AUTOR,TITOL,PAG,MATERIES2,TOPOGRAFIC FROM $tabla WHERE (AUTOR LIKE '%$busc%' ) ",$conexion);


<
TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>      
    <
TR>    
    <
TD>&nbsp;<B>REGISTRO</B></TD
    <
TD>&nbsp;<B>AUTOR</B></TD>
    <
TD>&nbsp;<B>TITOL</B></TD>
    <
TD>&nbsp;<B>MATERIA</B></TD>
    <
TD>&nbsp;<B>TOPOGRAFIC</B></TD>
    </
TR>
 while (
$row mysql_fetch_array($resultado)){
     
printf("<tr>
            <td>&nbsp;%s</td>
            <td>&nbsp;%s</td> 
            <td>&nbsp;%s</td> 
            <td>&nbsp;%s</td>
            <td>&nbsp;%s</td> 
            
            </tr>"
,
            
$row["REGISTRO"], 
            
$row["AUTOR"],
            
$row["TITOL"],
            
$row["MATERIES2"],
            
$row["TOPOGRAFIC"]}; 
</
TABLE>
}   
<?
if (
$condic=='Titulo')
{
    
$resultadomysql_query("SELECT * FROM $tabla WHERE (TITOL LIKE '%$busc%' ) ",$conexion);
echo 
"<table align=center border=2>";

while (
$registro mysql_fetch_row($resultado)){
       
       echo 
"<tr>";
       foreach(
$registro  as $clave){
       echo 
"<td>",$clave,"</td>";
 }

}
echo 
"</table>";

}
if (
$condic=='Materia')
{
    
$resultadomysql_query("SELECT * FROM $tabla WHERE (MATERIES LIKE '%$busc%' ) ",$conexion);
echo 
"<table align=center border=2>";

while (
$registro mysql_fetch_row($resultado)){
       
       echo 
"<tr>";
       foreach(
$registro  as $clave){
       echo 
"<td>",$clave,"</td>";
 }
}
echo 
"</table>";
}
if (
$condic=='Registro')
{

    
$resultadomysql_query("SELECT * FROM $tabla WHERE REGISTRO=$busc ",$conexion);
echo 
"<table align=center border=2>";

while (
$registro mysql_fetch_row($resultado)){
       
       echo 
"<tr>";
       foreach(
$registro  as $clave){
       echo 
"<td>",$clave,"</td>";
 }
}
echo 
"</table>";
}
    
mysql_free_result($resultado);
    
mysql_close($conexion);
    
header("location:pro1.php");

?>