I am running into a very strange issue with PHP 5.2.6 w/ IIS on Windows XP (have tried both CGI and ISAPI). I am running a fresh installation with the default php.ini settings.
First, assume the following (ugly, but effective) HTML code:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="test1" value="foo" />
<input type="hidden" name="test2" value="bar" />
<input type="submit">
</form>
<br /><br />
<pre>
<?php print_r($_POST); ?>
</pre>
When the form is submitted, I expect it to bring out an array containing the two hidden variables. Instead all I see is an empty array. If I change the form method to "get" and change print_r($_POST) to print_r($_GET), I see the array items with no problem.
I have tried variations such as <?php print file_get_contents('php://input'); ?>
and <?php echo print_r($HTTP_POST_VARS); ?>
to no avail. Any ideas where the problem might lie?