Detailed introduction to the implementation of PHP obtaining form data and HTML embedding PHP scripts

黄舟
Release: 2023-03-06 12:26:01
Original
1549 people have browsed it

The following editor will bring you an article on the implementation of PHP obtaining form data and HTML embedding PHP scripts. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor and take a look.

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

Commonly used automatic global variables are as follows:

1. GET method

Function: Get the data submitted by get method

Format: $_GET["formelement"]

2. POST method

Function: Get the data submitted by post method

Format: $_POST["formelement"]

##3. REQUEST method

Function: Get data submitted in any way. The $_REQUEST automatic global variable contains all GET, POST, COOKIE and FILE data, if you don’t care about the data source.

Format: $_REQUEST["formelement"]

Check box, list box (the name is in the form of an array For example: "select[]", just use $_POST["select"] when getting its value)





无标题文档





用户名: 密码:

订单号:
">
Copy after login

The above is the PHP acquisition form A detailed introduction to the implementation of embedding data and HTML into PHP scripts. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!