From: [EMAIL PROTECTED] Operating system: Linux Redhat 7.3 PHP version: 4.2.3 PHP Bug Type: Arrays related Bug description: Posted Array loses variables
script below. When posting the form with the array variables, the receiving function 'loses' the first 4 characters of posted information, whether numbers or letters. -----start script----- <? $ZONES=10; function saveInventory() { $counter=1; foreach($GLOBALS[date] as $x) { print "Date Array Item $counter: $x<br>"; $counter++; } addInventory(); } function addInventory() { global $ZONES; //number of inventory slots to show at a time. $maxslots=20; print " <form method=post action='test.html?action=saveinventory'> <table border=0> <tr> <td><b>Date</b></td> <td><b>Time Slot</b></td> <td><b>Zone</b></td> <td><b>Inventory</b></td> </tr>"; for($x=1;$x<=$maxslots;$x++) { print " <tr> <td><input type=text name='date[$x]' size=11 maxlength= 10></td> <td><select name='time[$x]'> <option value='10am to 12pm'>10am to 12pm <option value='12pm to 2pm'>12pm to 2pm <option value='2pm to 4pm'>2pm to 4pm <option value='4pm to 6pm'>4pm to 6pm <option value='6pm to 8pm'>6pm to 8pm </select></td> <td><select name='zone[$x]'>"; for($y=1;$y<=$ZONES;$y++) { print "<option value='$y'>Zone $y"; } print "</select></td> <td><input type=text name='inventory[$x]' size=3></td> </tr>"; } print " <tr> <td colspan=4><input type=submit value='Save Inventory'>< /td> </tr> </table> </form>"; } switch($action) { case "saveinventory": saveInventory(); break; default: addInventory(); break; } ?> -----end script----- ----configure line---- './configure' '--with-apxs' '--with-mysql' '--with-gd' '-- with-png-dir=/usr/lib' '--with-jpeg-dir=/usr/lib' '--with- freetype-dir=/usr/lib' '--enable-trans-sid' '--with-xml' '- -enable-wddx' '--enable-mbstring' '--enable-mbstr-enc- trans' '--with-config-file-path=/etc' '--with-zlib-dir=/ usr/lib' '--enable-bcmath' '--with-curl' -- Edit bug report at http://bugs.php.net/?id=19981&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19981&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19981&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19981&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19981&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19981&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19981&r=support Expected behavior: http://bugs.php.net/fix.php?id=19981&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19981&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19981&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19981&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19981&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19981&r=dst IIS Stability: http://bugs.php.net/fix.php?id=19981&r=isapi