|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-02-28 01:29 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 UTC |
Hi, I don't enclose information about the phh.ini etc, because I really think it doesn't matter! This is very easy to reproduce: This is form.html: <HTML> <FORM ACTION="caz.php3" METHOD=POST> <INPUT TYPE=HIDDEN NAME=variab[caz4][1] VALUE="1"> <INPUT TYPE=HIDDEN NAME=variab[caz5][2] VALUE="1"> <INPUT TYPE=HIDDEN NAME=variab[caz5][3] VALUE="1"> <INPUT TYPE=HIDDEN NAME=variab[caz5][4] VALUE="1"> <INPUT TYPE=HIDDEN NAME=variab[caz6][8] VALUE="1"> <INPUT TYPE=SUBMIT> </FORM> this is caz.php3: ################## CAZ.php3 ################## <HTML> <? for($i=0;$i<count($variab);$i++){ $pp=key($variab); echo("CHIAVE: -$pp-<BR>\n"); next($variab); } ?> #################### And the result is...: CHIAVE: -caz4][1- CHIAVE: -caz5][2- CHIAVE: -caz5][3- CHIAVE: -caz5][4- CHIAVE: -caz6][8- The point is that if the passed variable is a multidimensional array, the square brackets are not checked, and the key for the variables can be... what you read above :-( A last note: I am writing a quite big project, and I've a deadline quite near... is this bug hard to correct? Or... pheraps, it's my own mistake? :-( Please, let me know!