Basically I am trying to check what's currently on my database and put it as default option with help of some PHP. Could you show me a solution how to adjust my code or any alternative for this?
I tried adding select="selected" by PHP
<select name="offers" required>
<option value="yes" <?php if($offers=="yes"){?>selected="selected"<?php}?> >yes</option>
<option value="no" <?php if($offers=="no"){?> selected="selected"<?php}?> >no</option>
</select>
I just want to make it automatically choose option as selected which is equal to the variable that I get from the database