PHP 9 usage of Super global variables (II) _ PHP Tutorial

Source: Internet
Author: User
Usage of php9 Super global variables (2 ). Let's talk about $ _ GET () and $ _ POST () today (). In fact, it is easy to understand. it can be seen from the surface that it is to obtain the data of the post and get Forms. In fact, this is also the case. let's talk about $ _ GET () in a professional way today () and $ _ POST ().

In fact, it is easy to understand. it can be seen from the surface that it is to obtain the data of the post and get Forms. In fact, this is also the case. if you want to be professional,

The $ _ GET variable is an array with the variable name and value sent by the http get method.

The $ _ GET variable is used to collect the values in the form from method = "get. The information sent from a form with the GET method is visible to anyone (displayed in the address bar of the browser), and the amount of information sent is limited (up to 100 characters ). Well, let's take a look at the code on the simple logon interface:

 


It will be submitted to the get. php page and its code will be viewed again:

Welcome 
 .
You password is


You can use $ _ GET ["name"] to obtain the value of name in the form. The effect is as follows. $ _ GET () effect.

$ _ POST is essentially the same as $ _ GET (), but it is only the same as get fish post. here I will not elaborate on it. the code and get are the same, the index page only changes the get method to post, and the accept page to $ _ POST ['name']. $ _ POST effect.

Merge () and $ _ POST (). In fact, it is easy to understand. it can be seen from the surface that it is to obtain the data of the post and get Forms. In fact, this is also the case. to be professional...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.