|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-18 15:50 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 06:00:01 2025 UTC |
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'