Home > php教程 > php手册 > php提交表单时判断 if($

php提交表单时判断 if($

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 08:55:23
Original
963 people have browsed it

应该这样用if(isset($_POST['submit'])) {
}
提交表单时 if($_POST[submit])与 if(isset($_POST[submit])) 的区别

第一种方法会出现一个warning,第二种相对更严谨。
还有就是POST的键名最好加上单引号,这样效率稍微高点(大概3-4倍)。
恩 差不多那个意思,如果设置了这个变量则返回true

PHP中if(isset($_POST['Submit']))是什么意思
isset -- 检测变量是否设置

判断post过来的数据是否被提交过来

复制代码 代码如下:


if(isset($_POST["submit"]){
echo "提交过来了";
}else
{
echo "submit is no come~";
}



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 Issues
Why can’t my submit button submit data?
From 1970-01-01 08:00:00
0
0
0
Ajax click submit but no response!
From 1970-01-01 08:00:00
0
0
0
Click submit but nothing shows up
From 1970-01-01 08:00:00
0
0
0
git submit issue
From 1970-01-01 08:00:00
0
0
0
angular.js - angular's ng-submit does not trigger
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template