Home > Backend Development > PHP Tutorial > PHP example code: Determine whether the Form form is submitted_PHP tutorial

PHP example code: Determine whether the Form form is submitted_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 14:56:24
Original
1163 people have browsed it

 Agni Website Building Academy (Bkjia.Com) PHP Programming Today I will introduce an article about PHP judging whether the Form form is submitted. Before A few days ago, I saw a friend asking this question on the webmaster Q&A forum, and then someone gave an example code. The code is as follows:

以下为引用的内容:
$action=$HTTP_POST_VARS["Button1"];
if($action=="提交") {
//执行表单操作
} else {
//读取默认值
}
?>  

In fact, the above code is a bit complicated and can be simplified to:

The following is the quoted content:
以下为引用的内容:
if(isset($HTTP_POST_VARS["Button1"])) {
//执行表单操作
} else {
//读取默认值
}
?>  
if (isset($HTTP_POST_VARS["Button1"])) {

//Perform form operation

} else {

//Read default value ?>
http://www.bkjia.com/PHPjc/364214.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364214.htmlTechArticle
LieHuo.Net PHP Programming Today I will introduce an article about PHP judging whether the Form form is submitted. , I saw a friend asking this question in the webmaster Q&A forum a few days ago, and then...
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 Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template