The previous article "Talk about PHP syntax" has already talked about PHP's data types and expressions. Now, let’s take a look at PHP variables and constants.
Let’s look at an example first.
This is a routine
In the above example, function is to define a custom function. The next two variables $file and $line are two local variables. They only work in the function body and do not interfere with the variables outside the function. If there is $file or $line outside the function, , the values of two $files and two $lines are not necessarily the same. _FILE_ and _LINE_ are two constants, and their values have already been determined. _FILE_ is the file name of this file, _LINE_ is the line number of the execution line. There is another sentence in the function body: global $message; Its function is to enable the global variable $message to be applied to the function body. This sentence can also be written as $GLOBAL["message"];
For GET, POST and PHP will automatically treat the information generated by mechanisms such as cookies as PHP variables. In this way, the information processing of submitting the form is particularly easy. As follows:
File: form.html