Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/09/2008, 15:03
Avatar de Taldreakan
Taldreakan
 
Fecha de Ingreso: julio-2008
Mensajes: 128
Antigüedad: 15 años, 9 meses
Puntos: 2
Respuesta: Verificacion de codigo

No se para que usas los inputs, me imagino que para insertar un nuevo registro dando una accion a tu form; pero yo dejaria un table para mostrar los datos y otro para el formulario.

Quedaria de la siguiente manera:

Código PHP:
<!-- Aqui tu formulario -->
<form>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
  <TR>
    <TD>Apellido: </TD>
    <TD><input type="text" name="apellido"></TD>
    <TD>Nombre: </TD>
    <TD><input type="text" name="nombre"></TD>
  </TR> 
  <TR>
    <TD>Cedula: </TD>
    <TD><input type="text" name="cedula"></TD>
    <TD>Codigo: </TD>
    <TD><input type="text" name="codigo"></td>
  </TR>
</TABLE>
</form>

<!-- Aqui el resultado de la consulta -->
<table>
</tr>
  <tr>
    <th>Apellido</th>
    <th>Nombre</th>
    <th>Cedula</th>
    <th>Codigo</th>
  </tr>
<?php       
while($row mysql_fetch_array($result)) 

?>
  <tr>
    <td>&nbsp;<? echo $row["apellido"]; ?>&nbsp;</td>
    <td>&nbsp;<? echo $row["nombre"]; ?>&nbsp;</td>
    <td>&nbsp;<? echo $row["cedula"]; ?>&nbsp;</td>
    <td>&nbsp;<? echo $row["codigo"]; ?>&nbsp;</td>
  </tr>
<?php
 

   
mysql_free_result($result); 
   
mysql_close($link); 
?> 
</table>