I want to validate a form field to make sure it is not blank.
The problem is, if someone enters "0", my test doesn't work:
if (!$variable) {
echo "You forgot to enter something";
exit();
}
this will exit if someone enters a zero in the field. i'm unaware of an !=== operator, and there's no "unless" construct like there is in perl (also, to the best of my knowledge).
any thoughts?