PHP9 the use of a Super global variable (II.)

Source: Internet
Author: User
Tags variable

Today, $_get () and $_post ().

In fact, it is easy to understand, according to the superficial meaning can be seen, is to obtain the post and get form data, in fact, it is so, to point professional words,

The $_get variable is an array of variable names and values that are sent by the HTTP get method.

The $_get variable is used to collect values from the form method= "get". The information sent from a form with a Get method is visible to anyone (it appears in the browser's address bar) and has a limit on the amount of messages sent (up to 100 characters). OK, for example, the code for the simple login interface:


 
 

  
   
    
    Login Name: 
    Password: 
     
     
     
    
  

 
 


It will be submitted to get.php this page, and then look at its code:

Welcome 
 
  .
Password is


You can take the value of the table Tan Riming to name by $_get[' name '. The effect is as follows. $_get () effect.

$_post and $_get () are essentially no different, just the difference between get fish POST, where I don't dwell on, code and get, the index page just changes method to POST, accept page to $_post[' name '].$_ Post effect.



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.