Your script should work fine, and to fix claims made in
this thread:
a) $HTTP_RAW_POST_DATA is NOT an array, it's a string.
b) It does not live in $_SERVER, or rely on register_globals.
Your code is wrong because you don't provide names for your
fields, so there is no POST data. Assign your text field
a name, and your submit field a name, and it will work.
Also, keep in mind that $PHP_SELF existing requires the
PHP directive register_globals to be on.
Regards,
Philip
p.s. <input type="text" name="foo" value="bar">
^^^^
On Fri, 1 Aug 2003, Balazs Halasy wrote:
> I need to have the contents of $HTTP_RAW_POST_DATA because of
> non-regular uploads (from browser to my home-made WevDAV server implementation
> (done in PHP)). However, no matter what I
> do, it is always NULL. I guess the following script should return
> SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is
> added to the php.ini file (and yes, I've restarted apache :-)... so, why
> is it empty and how can I get the RAW post data? My PHP version is 4.3.2.
>
> test.php:
>
> <form action="<?echo($PHP_SELF)?>" method="post">
> <input type="text" value="you-suck">
> <input type="submit">
> </form>
> <?php
> echo("Raw post data: ".$HTTP_RAW_POST_DATA."<br>\n");
> echo("Raw post data decoded:
> ".base64_decode($HTTP_RAW_POST_DATA)."<br>\n");
> echo("<hr>");
> phpinfo();
> ?>
>
>
>
> Allman
>
>
> --
> 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