Home > Backend Development > PHP Tutorial > 新手在线等 请教php判断表单文本是否为空的问题

新手在线等 请教php判断表单文本是否为空的问题

WBOY
Release: 2016-06-23 13:49:15
Original
937 people have browsed it

html文件






核桃种类:









php文件

require_once("conn.php");
$pictype=$_post['pictype'];
if($pictype=="")
{echo "没有填写种类";}
else
{

echo "添加种类成功";
}
?>

总是显示没有填写种类请问我哪里出错了?谢谢


回复讨论(解决方案)

==是大小和数值都相等,你试试把if($pictype=="")改成if(!$pictype)看下

是 $_POST['pictype'] 不是 $_post['pictype']; 

$_POST大写

==是大小和数值都相等,你试试把if($pictype=="")改成if(!$pictype)看下


还是不行
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