I want to have a drop-down list have a default value akin to how you would have value="abc" in a text field or similar. The only caveat is that I would like it to be defaulted to where an SQL query points it to. Excuse the long code.
//prior code where table and `foreach()` loop begins
<td>
<input type="text"
value="<?php echo $var["author"]; ?>"
required="required">
</input>
</td>
<td>
<select name="condition"
value="<?php echo $var["condition"]; ?>"
<option>M</option>
<option>NM</option>
<option>E</option>
<option>G</option>
<option>P</option>
</select>
</td>
//subsequent code where table is closed
For the first half, I have a text field of default value $var["author"], because that is what I query before beforehand. For the second, I can't seem to get the same result, due to it being a drop-down menu instead of a text field. If the .sql query brings up "NM", the default value will be "M", always. Any way to do this?