<?php
include 'conexion.php';
$con=conexion();
$res=mysql_query("select * from personas",$con);
?>
<!DOCTYPE html>
<html>
<body>
<h1>Insertar Datos</h1>
<form method="post" action="insertar.php">
<table border="1">
<tr>
<th></th>
<th>Codigo</th>
<th>Nombre</th>
</tr>
<?php
while($fila=mysql_fetch_array($res)){
?>
<tr>
<th><input type="checkbox" name="casilla[]" value="<?php echo $fila[cod]; ?>"><td width="95" height="44"></th>
<th><label for="cod"></label>
<input name="cod[]" type="text" id="cod" value="<?php echo $fila[cod]; ?>"></th>
<th width="98"><label for="nombre"></label>
<input name="nombre[]" type="text" id="nombre" value="<?php echo $fila[nombre]; ?>"></th>
</tr>
<?php
}
?>
</table>
<input type="submit" value="insertar" />
</form>
</body>
</html>