How can you fetch data into select form fields and have the data stored in the database as selected?
Code:
<select name="favourite_fruit">
<option>Apples</option>
<option>Bananas</option>
<option>Oranges</option>
</select>
I was thinking something like:
Code:
<select name="favourite_fruit">
<option selected><?= $fruit ?></option>
<option>Bananas</option>
<option>Oranges</option>
</select>
But don't think the unselected fruits would show up in the select menu...