jim.davidson Posted May 5, 2008 Share Posted May 5, 2008 if (empty($_POST['refills'])) { $error['refills'] = 'Please enter a Refill Amount'; } How can I tell if refills are 0 which is ok, vs blank which is not? Link to comment https://forums.phpfreaks.com/topic/104239-need-to-tell-the-difference-between-0-and-blank/ Share on other sites More sharing options...
flyhoney Posted May 5, 2008 Share Posted May 5, 2008 if (!$_POST['refills'])) { //refills is blank } else if (is_numeric($_POST['refills'])) { //refills is some number } else { //refills is some string } Link to comment https://forums.phpfreaks.com/topic/104239-need-to-tell-the-difference-between-0-and-blank/#findComment-533655 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.