I. Contact and difference between get and post
1. Contact for Get and post
Both GET and POST create arrays (for example, array (key = value, Key2 = value2, Key3 = Value3, ...) )。 This array contains key/value pairs, where the key is the name of the form control, and the value is the input data from the user.
Get and POST are treated as $_get and $_post. They are hyper global variables , which means that access to them does not need to be scoped-no special code is required, and you can access them from any function, class, or file.
2. The difference between get and post
$_get is an array of variables passed to the current script through a URL parameter .
$_post is an array of variables passed through HTTP POST to the current script.Ii. use of Get and post
1, when to use?
Get usage Scenario: Non-sensitive data visible to anyone, limited to 2000 characters, displayed in the URL;
Post usage scenario: invisible to others, unlimited number of characters, embedding HTTP request body, support for higher-order functions.
2, how to use?
Using get
? Keyword=google&position=china "> Search
Using Post
Copyright NOTICE: This article for Lshare original article, need to reprint please contact me, have questions welcome comments or private messages.