what difference between NULL, blank and empty in php?
- by I Like PHP
i have one form which have some input box and some select box.
i want to apply that nothing can be empty or blank before further activity,
so i use below condition
foreach($_POST as $k=>$v)
{
if($v=='' || $v==NULL || empty($v))
{
$_SESSION['errMsg']=' Please fill all the fields properly';
header("location:somepage.php");
exit;
}
}
now my question is:
above if is useful or not?
if not then which condition is enough to prevent blank entry $v=='' or $v==NULL or empty($v) or i have to use all of these conditions?
Thanks in advance