Forums Register Login

selection box values from database

+Pie Number of slices to send: Send
Hello Friends,
How can I populate my selection box values from database,please help me out
+Pie Number of slices to send: Send
I used the code below. It gets all the userNames from the db and populate the drop down menu. Of course remember to first initialise your Connecetions and ResultSets.
out.pritnln("<SELECT NAME =selectedCustomer>");
out.println("<OPTION VALUE =none SELECTED> Please Select A userID </OPTION>");
while(rs.next()) {
userID = rs.getString("userID");
out.println("<OPTION VALUE =\"" + userID + "\" + ");
out.println(">" + userID + "</OPTION>");
} // end while
out.println("</SELECT>");
[This message has been edited by ernest fakudze (edited October 05, 2001).]
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 710 times.
Similar Threads
multi-selection list box
Servlet getting values from a combo box
accessing database using javascript
YUI Autocomplete with XML and JSP
How to store a check box in DataBase??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:49:46.