Implementation of obtaining form data with PHP and embedding HTML into PHP scripts

不言
Release: 2023-03-29 11:58:02
Original
1787 people have browsed it

This article mainly introduces the implementation of PHP obtaining form data and HTML embedding PHP scripts. It has a certain reference value. Now I share it with you. Friends in need can refer to it.

PHP accepts HTML When the form submits information, the submitted data will be saved in the 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

Related recommendations:


PHP method to get page execution time

PHP method to get the first Chinese initial letter and sort it

Detailed explanation of PHP getting memory usage

The above is the detailed content of Implementation of obtaining form data with PHP and embedding HTML into PHP scripts. For more information, please follow other related articles on the PHP Chinese website!

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
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!