ID:               19981
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Arrays related
 Operating System: Linux Redhat 7.3
 PHP Version:      4.2.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2002-10-18 10:33:50] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=19981&edit=1

Reply via email to