<?php include("dbconnect.php");
menu();
?>

<b>Busqueda de Incidencias de
  
<?php
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$nom = mysql_query("select nombre,telefono from clientes where clientes.numero=$parabuscar");
$nom2 = mysql_fetch_array($nom);
echo "<u>";
echo $nom2["nombre"];
echo "</u>";
echo "-Tel. ";
echo $nom2["telefono"];
echo "</b>";
echo "<form name=buscar method=post action=b_nombre_p.php action=post>";
echo "  <b>Pendientes:</b>";
echo "  <input type=submit name=parabuscar value=$parabuscar>";
echo "</form>";

$result = mysql_query("select * from reparacion where
    reparacion.numero_cliente='$parabuscar'") or
    die (mysql_error());

echo $client;
echo "<table border='1'>";
  echo "<tbody>";
    echo "<tr>";
      echo "<td><strong>Numero</strong></td>";
      echo "<td><strong>Fecha entrada</strong></td>";
      echo "<td><strong>Fecha salida</strong></td>";
      echo "<td><strong>Material que trae</strong></td>";      
      echo "<td><strong>Descripcion averia</strong></td>";
      echo "<td><strong>Editar</strong></td>";
     echo "</tr>";
echo "<tr>";
while ($row = mysql_fetch_array($result))
{
echo "<td>";
echo $row["numero"];
echo "</td>";


echo "<td>";
echo $row["fecha_entrada"];
echo "</td>";

echo "<td>";
echo $row["fecha_salida"];
echo "</td>";

echo "<td>";
echo $row["material"];
echo "</td>";

echo "<td>";
echo $row["descripcion"];
echo "</td>";
echo "<td>";
echo "<form name=cambi method=post action=update.php action=post>";
echo "<input type=submit name=Editar value=$row[numero]>";
echo "</form>";
echo "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
mysql_free_result($result);
?>
