For beginners of PHP, the understanding of variables is still vague. I hope you can use this article to have a detailed understanding of the PHP external variables and deepen your understanding of the PHP language.
PHP external variable sample code:
- <Form action = "one. php"
- Method = "get">
- User: <input type = "text"
- Name = "username"> <br>
- Password <input type = "password"
- Name = "pass"> <br>
- <Input type = "submit" values "OK">
- </Form>
- < ?php
- Echo “user”;
- Echo $_get[“username”];
- ?>
$ _ Get can only accept data sent back by the get Method
$ _ Post can only accept data sent back by the post Method
$ _ Request can accept data sent from all methods
It can also be passed directly. PHP external variables are separated.
<A href = "one. php? Name = hello & pass = hello "> hello </a>.
It is best to use $ _ get or $ _ request to receive the request.
Other PHP external variables
$ _ Files
$ _ Cookie
$ _ Session
The passed PHP external variables can be used directly on this page.