post-data.php
cantain a form to post user'name into show-post-data.php
.
post-data.php
<form method="post" action="show-post-data.php">
user:<input type="text" name="user"></input>
<input type="submit" name="submit" value="submit">
</form>
Only one command var_dump($_POST);
in show-post-data.php
<?php
var_dump($_POST);
?>
1.click 127.0.0.1/post-data.php
in browser.
2.input tom
and click submit button.
3.click 127.0.0.1/show-post-data.php
in browser.
We get output as below:
array(2) { ["user"]=> string(3) "tom" ["submit"]=> string(6) "submit" }
4.click 127.0.0.1/show-post-data.php
in browser for second time.
Nothing as output.$_POST
is empty now.
$_POST'value can only be used for one time?