亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

$_POST variable

In PHP, the predefined $_POST variable is used to collect values ??from the form with method="post".

$_POST variable

The predefined $_POST variable is used to collect values ??from the form with method="post".

Information sent from a form with the POST method is invisible to anyone (will not be displayed in the browser's address bar), and there is no limit on the amount of information sent.

Note: However, by default, the maximum amount of information sent by the POST method is 8 MB (can be changed by setting post_max_size in the php.ini file).

Variables sent via HTTP POST will not appear in the URL.

There is no length limit for variables.

However, since the variable does not appear in the URL, the page cannot be bookmarked.

Example

form.html file code is as follows:

<html>
<head>
<meta charset="utf-8">
<title>php.cn</title>
</head>
<body>
 
<form action="welcome.php" method="post">
名字: <input type="text" name="fname">
年齡: <input type="text" name="age">
<input type="submit" value="提交">
</form>
 
</body>
</html>

When the user clicks the "Submit" button, the URL is similar to the following:

http: //ipnx.cn/welcome.php

"welcome.php" file can now collect form data through the $_POST variable (please note that the name of the form field will automatically become the name in the $_POST array Key):

歡迎 <?php echo $_POST["fname"]; ?>!<br>
你的年齡是 <?php echo $_POST["age"]; ?>  歲。


Continuing Learning
||
<html> <head> <meta charset="utf-8"> <title>php.cn</title> </head> <body> <form action="welcome.php" method="post"> 名字: <input type="text" name="fname"> 年齡: <input type="text" name="age"> <input type="submit" value="提交"> </form> </body> </html>
submitReset Code