Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes storing check boxes values into diffrent columns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "storing check boxes values into diffrent columns" Watch "storing check boxes values into diffrent columns" New topic

storing check boxes values into diffrent columns

viji reddy

Joined: Jan 07, 2008
Posts: 1

I have 3 checkboxes.I want to store selected checkboxes values into diffrent coumns that is one check box value into one column.and making unselected checkbox values in data base columns as null.iam using servlets/ can i insert ..

kindly help me.

Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
document.formname.checkboxname.checked gives the name of the checkboxes you have selected and get those values correspondingly.get those values in servlet using request.getParameter("") and then do the database operations
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
In case you have multiple checkboxes/parameters under on name, which is a norm, you can use request.getParameterValues(). This way you will only get checked boxes.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: storing check boxes values into diffrent columns
Similar Threads
validating user,password in ejb
Variable Property
How to insert integer variable using jdbc
EJB Examples on Weblogic 6.0
Managing the width of the columns of datatable