Home > Backend Development > PHP Tutorial > 新手 请问php判断表单文本是否为空的有关问题

新手 请问php判断表单文本是否为空的有关问题

WBOY
Release: 2016-06-13 12:06:20
Original
797 people have browsed it

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






核桃种类:









php文件

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

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

总是显示没有填写种类请问我哪里出错了?谢谢
------解决思路----------------------
==是大小和数值都相等,你试试把if($pictype=="")改成if(!$pictype)看下
------解决思路----------------------
是 $_POST['pictype'] 不是 $_post['pictype']; 
------解决思路----------------------
$_POST大写
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