cyberRobot Posted December 6, 2019 Share Posted December 6, 2019 1 minute ago, Skittle said: I changed the preg_match stuff to elseif(is_numeric($minPrice)) instead Be aware that is_numberic() will accept values that you likely won't want. More information can be found here:https://www.php.net/manual/en/function.is-numeric.php If the values are supposed to be whole numbers, you could give this function a shot:https://www.php.net/manual/en/function.ctype-digit.php Quote Link to comment https://forums.phpfreaks.com/topic/309643-why-does-my-code-automatically-think-the-textbox-is-empty/page/2/#findComment-1572337 Share on other sites More sharing options...
Barand Posted December 6, 2019 Share Posted December 6, 2019 elseif (is_numeric($minPrice)) probably needs to be elseif (!is_numeric($minPrice)) // error if NOT numeric 1 Quote Link to comment https://forums.phpfreaks.com/topic/309643-why-does-my-code-automatically-think-the-textbox-is-empty/page/2/#findComment-1572338 Share on other sites More sharing options...
Skittle Posted December 6, 2019 Author Share Posted December 6, 2019 24 minutes ago, Barand said: elseif (is_numeric($minPrice)) probably needs to be elseif (!is_numeric($minPrice)) // error if NOT numeric ah yes right! That worked and my issues haave been resolved thanks! Quote Link to comment https://forums.phpfreaks.com/topic/309643-why-does-my-code-automatically-think-the-textbox-is-empty/page/2/#findComment-1572339 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.