I have a database where there is responders and a eventstatus. my responders has options Team A and Team B and my eventstatus is pending active and complete
if event is Active and for example responder it = Team A i wanted it to be disabled in the option here is my code
<select class="form-select text-capitalize" aria-label="Default select example" name="eRes">
<?php
$sql1 = "SELECT responders FROM tbemergency WHERE eventstatus='Active'";
$result1 = $con->query($sql1);
if ($result1->num_rows > 0) {
$result_fetch = mysqli_fetch_assoc($result1);
if($result_fetch['responders'] == 'Team A'){ ?>
<option value="Team A" disabled>Team A</option>
<?php }else { ?>
<option value="Team A" >Team A</option>
<?php } ?>
<?php
if($result_fetch['responders'] == 'Team B'){ ?>
<option value="Team B" disabled>Team B</option>
<?php }else { ?>
<option value="Team B" >Team B</option>
<?php }
} ?>
this is my code that i am using and whats happening is only Team A is disabled where i also have an active eventstatus with team b