Your problem is this line:
if (isset($_POST['call_16']) == 'No' ) {
isset()
returns true
or false
based on whether the 'call_16'
item exists in the $_POST
array. It doesn’t return the value. So isset($_POST['call_16'])
is true
, not 'No'
. If you want to check if it’s set and that it has a specific value (which you should), then you need to check them separately:
if (isset( $_POST['call_16'] ) && 'No' === $_POST['call_16'] ) {
Although, it should be said that you’ve already used $_POST['call_16']
earlier, so the check for whether or not it’s needs to happen earlier, and then just check the value for this specific condition.