Thanks Dan, but I don't think I'm explaining well.

Submitting that form will produce, from most browsers, a request that has in
one of it's headers:

content-type: x-www-form-urlencoded

... the variable $Foo will automatically be available within PHP for use in
any script that form is directed to, however, I have to write a script that
will accept raw data, it's input comes from a server that is not kind enough
to put in the header content-type: x-www-form-urlencoded and so is not
automatically being passed by PHP into the script.

The page content is just raw data like this ...


... but php does not pass them into variables as content-type is not

The answer could be "tell the people to add the content type" but they say
"by the end of june" and I need to read this stuff today!

Sorry if my explanation inadequate, I'm trying my best.



> Simon:
> <form method="post">
> <input type="submit" name="Foo" value="Boo" />
> </form>
> <?php
> if ( isset($_POST['Foo']) ) {
> echo '<p>' . $_POST['Foo'] . '</p>';
> }
> ?>
> Viewing that the first time will show the form.  Submitting the form
> will show you the form again and then the value of Foo.
> --Dan

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to