Like I said, it works fine on any other server.  I was wondering if it
could be a configuration issue.

I believe $GLOBALS['HTTP_RAW_POST_DATA'] is not populated by default by a
setting in php.ini.  I turned it on to verify that the browser was
actually transmitting the data which was missing from the array.

Mark.


On Tue, 29 Oct 2002, Kevin Stone wrote:

> I Copy and Pasted your code directly from this email and tested it.
> $GLOBALS['HTTP_RAW_POST_DATA'] never gets set, but the rest of it worked
> fine.  Curious.
> -Kevin
>
>
> ----- Original Message -----
> From: "Mark Heintz PHP Mailing Lists" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 29, 2002 2:20 PM
> Subject: [PHP] form arrays not populating $_POST
>
>
> > I'm having a problem where $_POST is being populated with the values of a
> > set of checkboxes after moving the script to a new server.  The checkbox
> > values appear in the raw post data, the proper number of indexes are
> > created, but the data does't make it into the superglobal.
> >
> >
> > The form similar to the following:
> >
> > <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
> > <input type="hidden" name="test" value="Hello">
> > <input type="checkbox" name="some_var[]" value="1"> 1
> > <input type="checkbox" name="some_var[]" value="2"> 2
> > <input type="checkbox" name="some_var[]" value="3"> 3
> > <input type="submit" name="submit" value="submit">
> > </form>
> >
> >
> >
> > The php to check it:
> >
> > <?php
> > if(isset($_POST['some_var'])){
> >   echo "<pre>";
> >   echo $GLOBALS['HTTP_RAW_POST_DATA']."\n\n";
> >   print_r($_POST);
> >   echo "</pre>";
> > }
> > ?>
> >
> >
> > Checking checkbox 1 and 2 and submitting results in the following:
> >
> > test=Hello&some_var%5B%5D=1&some_var%5B%5D=2&submit=submit
> > Array
> > (
> >     [test] => Hello
> >     [some_var] => Array
> >         (
> >             [0] =>
> >             [1] =>
> >         )
> >
> >     [submit] => submit
> > )
> >
> >
> > This is running under php 4.2.3 on apache 1.3.20.  The script was working
> > fine on the previous server (same php and apache version).  The only
> > oddity is that the script utilizes phplib (some_var is registered as a
> > phplib session var), but I'm performing the print_r before any phplib
> > files are included.
> >
> > Has anyone ever encountered this problem?
> >
> > Thanks,
> > mh.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to