Updating a selection with database

C

Clive_

Hi,

I am trying to create an application using a database to update a
selection box.
A listbox has a selection Yes/No, read from the database.
If the user changes the selection, it will be updated in the
selection.

The format for a selection is simple:
<td >
<select name="WallTimberurgent" size="1" disabled="disabled">
<option value="1">YES</option>
<option selected value="0">NO</option>
</select>
</td>

Java represents the database cell selected as:
<%= rs.getString(1) %>

I have no idea how you would Get the list to read the database.
The user can change the selection, it cannot be set to a fixed value.
<td >
<select name="WallTimberurgent" size="1" disabled="disabled">
<option value="1">YES</option>
<option selected value=<%= rs.getString(1) %>NO</option>
</select>
</td>


The selection needs to be dynamic, the user may select Yes that would
be written to database.
The selection would be Yes (in selection box).

If the user then changed their mind and selected No, and updated
datanase, the selection would be changed.


Can anyone help???

Thanks

Clive
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top