Home  >  Article  >  Backend Development  >  PHP implementation of obtaining form data and HTML embedded PHP script

PHP implementation of obtaining form data and HTML embedded PHP script

墨辰丷
墨辰丷Original
2018-05-25 15:50:231405browse

This article mainly introduces the PHP implementation of obtaining form data and HTML embedding PHP scripts. Interested friends can refer to it. I hope it will be helpful to everyone.

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)





无标题文档

用户名: 密码:

订单号:
">

The above is the entire article Content, I hope it will be helpful to everyone’s study.


Related recommendations:

AJAX submissionForm dataExample analysis

PHP Post cannot obtain non- form dataHow to handle

##PHP

Form dataCode to write to MySQL database

The above is the detailed content of PHP implementation of obtaining form data and HTML embedded PHP script. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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