The following code works great until inQuantity receives a zero "0". Upon receiving a zero it evaluates it as empty and puts in a null instead of a "0". If "0.00" is entered it is evaluated as not empty.
$_POST['inQuantity'] = (!empty($_POST['inQuantity'])) ? $_POST['inQuantity'] : NULL;
the following code produces the same result
if (empty($_POST['inQuantity'])) {
$state = "empty";
} else {
$state = "full";
}
when inQuantity is "0" the output of $state is "empty"
Anybody know why this is?