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> <? echo $row["apellido"]; ?> </td>
<td> <? echo $row["nombre"]; ?> </td>
<td> <? echo $row["cedula"]; ?> </td>
<td> <? echo $row["codigo"]; ?> </td>
</tr>
<?php
}
mysql_free_result($result);
mysql_close($link);
?>
</table>