update using an option drop down list
Posted on 2002-07-22
I have the following option selection drop down list:
<select name=keyword1 size=1>
<option name="keyword1" VALUE="#Trim(keyword1)#"></option>
<option name="keyword1" value="#bookkeyword#" Selected>#bookkeyword#</option>
This allows me to select a keyword and add it to a database. I now want to create an update or edit form that enables me to see what keyword was previously selected and change it if necessary. I am having difficulty finding the proper code to set the keyword in the current option list so I can see what it was previously and then allow me to change it, subsequently passing it back to the database for updating. I would appreciate help.
Can you also tell me how I can set this select list to initally show the first value in the list when a previous keyword has not been saved in the database table or when the keyword is being selected for the first time?