how to store the checkbox value in the database?

i want to store the value of the checkbox i select, in the database.how do i do that?Plz help
[114 byte] By [mansi_b85a] at [2007-11-26 22:40:20]
# 1
<input type=checkbox value=eed>Red</input><%String x=request.getParameter("eed");%>Now you can store the value of x in Database
satyadoorvaa at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
i think this code works for JSP. i m implementing in java jdk1.3 and back end oracle.
mansi_b85a at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
You didn't say what kind of "checkbox" you had in mind. Like satyadoora suggests, there are two steps:1. Get the data from the checkbox.2. Put it into the database.Which of these two steps do you have a problem with? And explain your problem in more detail.
DrClapa at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

hi try this

<input type="checkbox" name="check" value="1">

<input type="checkbox" name="check" value="2">

<input type="checkbox" name="check" value="3">

at the back end form(jsp/servlet)

String check[]=request.getParametersValues("check");

u should iterate that array,then insert into table ........

only selected check box values will be taken.....

sundar82a at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
thank u all for your replies.but as i mentioned, i m using java and not jsp.i want that whan i click the checkbox , the name(value) of the checkbox should be stored in the oracle database.
mansi_b85a at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
hi siri have same question,can you show me more detail about iterate?i write my servlet with;bean.setCheckedItems(request.getParameterValues("chechedItems"))and insert with a bean, can you tell me how to do ?
zangyuzia at 2007-7-10 11:54:07 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...