setting form selection
Posted: Wed Jan 07, 2004 5:07 pm
ok, say i have a page where a user can edit their setttings. say one of those things is their, oh i don't know, eye color. say their eye color si already stores as blue, but for some reason they actually meant to set it to green.
ok. if i know how to detect what color it is set as (blue), how do i have a drop down select box that has all the colors avilalable, but since it detects blue as the already set color, that is already selected?
i know in just html it is something like this:
but how do i set the selected parameter to go to whatever it currently is set at in the DB?
ok. if i know how to detect what color it is set as (blue), how do i have a drop down select box that has all the colors avilalable, but since it detects blue as the already set color, that is already selected?
i know in just html it is something like this:
Code: Select all
<select name="eye_color">
<option value="Blue" selected>Blue</option>
<option value="Green">Green</option>
<option value="Brown">Brown</option>
</select>