I try to run this script

<form action="test.php" method="POST">
Test 1
<input type="checkbox" name="server[]" value="ASP"> ASP
<input type="checkbox" name="server[]" value="C#"> C
<input type="checkbox" name="server[]" value="COLDFUSION"> ColdFusion
<input type="checkbox" name="server[]" value="JAVA"> Java
<input type="checkbox" name="server[]" value="PERL"> perl
<input type="checkbox" name="server[]" value="PHP"> PHP

<input type="submit" value="submit">
</form>

<?php
print_r($_POST);

?>

then I've check all the checkboxes,
and guess what the print_r says?


Array
(
[server] => Array
(
[0] => ASP
[1] => C#
[2] => FUSION
[3] =>
[4] =>
[5] => PHP
)

)

Why did it comes out that way?
Anyone care to explain?
Btw, mine is PHP/4.2.3 vs APACHE/1.3.26 run on Win98Se

    I'm having a similar problem. The first 4 characters of the values are being cut off. I've been searching high and low for a solution but to no avail. I'm running Apache 1.3.26 with PHP 4.2.3 on FreeBSD. I am not having this issue on a server with PHP 4.2.2.

      Instead of:

      print_r($_POST);

      You want to do this:

      print_r($_POST['server']);

        Yup, still don't want to move,
        i've try to use $_POST['server'] but
        this is that i;'ve come out with..

        Array
        (
        [0] => ASP
        [1] => C#
        [2] => FUSION
        [3] =>
        [4] =>
        [5] => PHP
        )

        Originally posted by Jayson
        Instead of:

        print_r($_POST);

        You want to do this:

        print_r($_POST['server']);

          print_r($HTTP_RAW_POST_DATA) shows all the values intact. Something in the parsing to $_POST is truncating the values. I've changed my implementation to use the cgi version (ugghh) and all seems to work correctly.

            I see,... so the php is screwed up?, but i've tried on win2k
            using php4.2.3 and apache1.3.26 works fine,
            i think there's a post on bugs.php.net about this.

            comments?

            Originally posted by fattooth
            print_r($HTTP_RAW_POST_DATA) shows all the values intact. Something in the parsing to $_POST is truncating the values.

              Write a Reply...