I have a html dropdown list (its pure html). I need to have the value selected based on query results. Like this:
<select name="state" class="formField">
<option value="">Select a State</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
</select>
So if query for a certain user returns State as 'CT', I need the selected value in dropdown to be CT, is there any way to do it other then checking with if statement on every line?