ID: 46098
User updated by: eusebiomarques at hotmail dot es
Reported By: eusebiomarques at hotmail dot es
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: centos
PHP Version: 5.3.0alpha2
New Comment:
bad code
Previous Comments:
------------------------------------------------------------------------
[2008-09-16 18:15:29] eusebiomarques at hotmail dot es
Description:
------------
the php can not asign the "date_1_fila_".$i in the _POST argument then
i must to write a lot of code to do this
Reproduce code:
---------------
<?php
if (isset($_GET['action']) && $_GET['action']=="save"){
for ($i=0;$i<10;$i++){
echo "post_1=".$_POST["date_1_fila_".$i];
$a="date_2_fila_".$i;
echo "post_2=".$_POST[$a];
echo "post_3=".$_POST["date_3_fila_".$i];
}
}
?>
<form id="form1" name="form1" method="post" action="?action=save">
<label> <div align="center"><input type="submit" name="Submit"
value="Salvar todas las rutas" /></div></label>
</form>
<br>
<br>
<?php
for($i=0; $i<10; $i++) {
?>
<input name="date_1_fila_<?php echo $i;?>" value="" type="text"
class="textbox" size="10" />
<input name="date_2_fila_<?php echo $i;?>" value="" type="text"
class="textbox" size="10" />
<input name="date_3_fila_<?php echo $i;?>" value="" type="text"
class="textbox" size="10" />
<?php
}
?>
Expected result:
----------------
i spect the result the data in the text field
the php can not asign the "date_1_fila_".$i in the _POST argument then
i must to write a lot of code to do this
Actual result:
--------------
post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=post_1=post_2=post_3=
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46098&edit=1