From: eusebiomarques at hotmail dot es
Operating system: centos
PHP version: 5.3.0alpha2
PHP Bug Type: Feature/Change Request
Bug description: _Post canot asign a variable , only a fixed string
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 bug report at http://bugs.php.net/?id=46098&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46098&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46098&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46098&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46098&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46098&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46098&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46098&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46098&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46098&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46098&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46098&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46098&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46098&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46098&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46098&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46098&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46098&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46098&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46098&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46098&r=mysqlcfg