I have a form that is working well until I decided to limit user input to ‘Yes’ or ‘No’. If the option is chosen it stores correctly to the database. The problem is that when I load the form (it’s a form for updating) the inputs that use the options only display the first option - in this case ‘Yes’. Here are two form inputs:
<div class="form-group">
<label for="givenname">Given Name</label>
<input value="<?= $volunteer->givenname; ?>" type="text" name="givenname" maxlength= "16" id="givenname" class="form-control">
</div>
<div class="form-group">
<label for="active">Active (Yes No)</label>
<select input value="<?= $volunteer->active; ?>" name="active" id="active" class="form-control">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
</div>
The first one correctly displays the correct ‘givenname’ stored in the database. The second displays ‘Yes’ every time. How can I display ‘Yes’ and ‘No’ correctly?
Thanks