Ver Mensaje Individual
  #9 (permalink)  
Antiguo 24/02/2009, 04:47
Koden
 
Fecha de Ingreso: marzo-2005
Mensajes: 197
Antigüedad: 20 años
Puntos: 1
Respuesta: Problema con inputs y arrays

¡Solucionado!

Finalmente dí con la cuestión per se.

La tabla tenía que ser así:

Código PHP:
<table cellspacing="0" summary="table" class="broom_table">
    <thead><tr><?php for ($r_1 0$r_1 count ($nombres); $r_1++){?><th><?php echo $nombres[$r_1];?></th><?php }?></tr></thead>
    <tbody>
        <?php $i 0;?>
        <?php while ($i 31){?>
        <tr<?php if ($i == 0){echo " class=\"odd\"";}else{echo " class=\"even\"";}?>>
        <?php for ($j 0$j 13$j++){?>
        <?php if ($j == 0){?>
        <td><?php echo $i 1;?></td>
        <?php }else{?>
        <?php
            $sel_2 
"SELECT " $i "_" . ($j 1) . " AS campo FROM estadillo WHERE id_producto='" $_GET["id_producto"] . "'";
            
$que_2 mysql_query ($sel_2$dbh) or die ('I cannot execute the query because: ' mysql_error () . '<br />And the query is: ' $sel_2 '<br />');
            
$x mysql_fetch_array ($que_2);
        
?>
        <td><input type="text" name="cols[<?php echo $i;?>][<?php echo ($j 1);?>]" value="<?php if (!empty ($x["campo"])) echo $x["campo"];?>" size="3" /></td>
        <?php }?>
        <?php }?>
        </tr>
        <?php $i++;}?>
        <tr><td colspan="13"><input type="submit" value="Guardar" /></td></tr>
    </tbody>
</table>