PHP to obtain form data and HTML embedded PHP script implementation, form php
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)
<! Doctype html>
The above PHP acquisition of form data and the implementation of HTML embedded PHP scripts are all the content shared by the editor. I hope to give you a reference, and I hope you can provide more support to the customer's house.