Hi guys,
What's the best way to test for an empty form value ? I am doing it like
this now:
$test = $_POST['inputTest'];
if(strlen($test ) < 1)
// it is empty !
Maybe I can just go:
if($test == '') // that's two single-quotes with nothing in between
// it is empty !
At least I avoid a function call that way. Maybe there is a better way ?
Take care,
Cyrus
What's the best way to test for an empty form value ? I am doing it like
this now:
$test = $_POST['inputTest'];
if(strlen($test ) < 1)
// it is empty !
Maybe I can just go:
if($test == '') // that's two single-quotes with nothing in between
// it is empty !
At least I avoid a function call that way. Maybe there is a better way ?
Take care,
Cyrus
Comment