I have a select tag ...
<select id="input_O6" type="text" name="select_input">
<option value="Level 1">Level 1</option>
<option value="Level 2">Level 2</option>
<option value="Level 3">Level 3</option>
<option value="Level 4">Level 4</option>
<option value="Level 5">Level 5</option>
<option value="Level 6">Level 6</option>
<option value="Level 7">Level 7</option>
<option value="Level 8">Level 8</option>
</select>
the user selects a value and I store the selected value to the sql database. When I reload the page, I'm retrieving the value selected in my php and I'm trying to set the select tag to this value. Other inputs, I simply do it like this...
<input id="input_O3" type="number" value=<?php echo $storedValue_O3;?>>
Is there a simple way to do this for the select tag?
Thanks in advance
selectand check if its same then add aselected="selected" to the option