This condition will fail when it is 0:
!empty ($_POST['interest'])
emtpy() will be true, so !empty() will be false.
All posted values are strings, so to test for a 0 value, you could use for example $_POST['interest'] === '0'. However, that would of course fail for a string like '0.00'
2
solved incorrect if statement value returned [closed]