$ _ POST and php Tutorial: // input can get the value, $ HTTP_RAW_POST_DATA is empty
$ _ POST organizes the submitted data in an associated array and encodes the data, such as urldecode and even code conversion.
Php: // input can also be used to obtain the original POST data.
Code
Echo file_get_contents ("php: // input ");
Instance
<Form action = "post. php" method = "post">
<Input type = "text" name = "user">
<Input type = "password" name = "password">
<Input type = "submit">
</Form>
Post. php
<? Echo file_get_contents ("php: // input");?>
Php: // input allows reading original POST data. Compared with $ HTTP_RAW_POST_DATA, it puts less pressure on the memory and does not require any special php. ini settings. Php: // input cannot be used for enctype = "multipart/form-data ".
Php $ _ POST
The $ _ POST variable is an array with the variable name and value sent by the http post method.
The $ _ POST variable is used to collect the values in the form from method = "post. The information sent from a form with the POST method is invisible to anyone (not displayed in the address bar of the browser) and there is no limit on the amount of information sent.
Html
<Form action = "welcome. php" method = "post">
Enter your name: <input type = "text" name = "name"/>
Enter your age: <input type = "text" name = "age"/>
<Input type = "submit"/>
</Form>
Welcome. php
Welcome <? Php echo $ _ POST ["name"];?>. <Br/>
You are <? Php echo $ _ POST ["age"];?> Years old!
Variables sent through http post are not displayed in the URL.
Variable has no length limit