Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/91.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
else部分不显示来自php的内容_Php_Html - Fatal编程技术网

else部分不显示来自php的内容

else部分不显示来自php的内容,php,html,Php,Html,有人能帮我吗。请我得到了正确的输出。非常感谢你 if($row==NULL) { echo "Invalid Input."; // while run, the echo statement not displaying. } else { o/p part.. //while run, response proper o/p } while($row=屏蔽了if($row==NULL)else部分。这样代码就不会到达else部分。--还有,数据库转义。如果你聪明的话,也可以使用准

有人能帮我吗。请

我得到了正确的输出。非常感谢你

if($row==NULL)
{
  echo "Invalid Input.";  // while run, the echo statement not displaying.
}
else
{
o/p part..   //while run, response proper o/p
}

while($row=
屏蔽了
if($row==NULL)
else部分。这样代码就不会到达else部分。--还有,数据库转义。如果你聪明的话,也可以使用准备好的语句。while()仅当行等于true时才会执行,因此不能为null。thnks。是否有其他方法将我的else部分消息传递给用户。?可能使用
mysql\u num\u rows
检查是否找到一些行?
if($row==NULL)
{
  echo "Invalid Input.";  // while run, the echo statement not displaying.
}
else
{
o/p part..   //while run, response proper o/p
}
$row=mysql_fetch_array($result);  // here the query executed

if($row!=NULL)    // here checking row not equal to null value.
{

Displaying part...

}
else      // here if the row is NULL; it will print the following echo statement.
{
echo "Invalid input.";
}