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">

The php to check it:

  echo "<pre>";
  echo $GLOBALS['HTTP_RAW_POST_DATA']."\n\n";
  echo "</pre>";

Checking checkbox 1 and 2 and submitting results in the following:

    [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?


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

Reply via email to