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.";
}