1.1 Submitting data through form form forms
Index.html
<form action= "test.php" method= "POST" >
<input type= "text" name= "username" value= "/>
<input type= "Submit" value= "Submission"/>
</form>
The form jumps to the test.php page, and the form data is passed through the post.
test.php
<?php
$username =$_post[' username '];
echo $username;
?>
$_post is a super global variable that is passed to the array of variables in the script via the Post method.
Other Super Global variables:
$GLBALS all global variable arrays
$_get An array of variables passed to the script by the GET method
$_cookie array of COOKIE variables
$_files array of variables related to file uploads
$_ENV environment variable Array
$_request array of variables for all user input
$_sessioin Session Variable Array
1.2 mutable variables
$a = "B";
$b = "zzz";
echo $ $a; Equivalent to $b
PHP Learning Diary (1)---php Quick start