PHP detailed introduction to how to obtain form data and embed HTML into PHP scripts

Source: Internet
Author: User
The following small series will bring you an article on how to get form data from PHP and embed HTML into PHP scripts. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at the following small series to bring you an article on PHP to get form data and HTML embedded PHP script implementation. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at it with Xiaobian.

When php accepts information submitted through an HTML form, it saves the submitted data in a global array. we can call the system-specific automatic global variable array to obtain these values.

Common automatic global variables are as follows:

1. GET Method

Function:Get the data submitted in get mode

Format: $ _ GET ["formelement"]

2. POST method

Function:Obtain data submitted in post mode

Format:$ _ POST ["formelement"]

3. REQUEST method

Function:Obtain the data submitted in any way. The $ _ REQUEST automatic global variable contains all the GET, POST, COOKIE, and FILE data. if you do not care about the data source.

Format:$ _ REQUEST ["formelement"]

Check box and list box (the name is in the form of an array, for example, "select []". you can directly use $ _ POST ["select"] to obtain its value)

 Untitled Document
 
 
">

The above is a detailed introduction to PHP's implementation of getting form data and Embedding PHP scripts in HTML. For more information, see PHP Chinese website (www.php1.cn )!

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.