This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes PHP and the fly likes Processing checkboxes data. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "Processing checkboxes data." Watch "Processing checkboxes data." New topic

Processing checkboxes data.

ashlan cooper

Joined: Nov 23, 2010
Posts: 11
Hey there, I'm trying to process the data in form I created.
this is my code

but I have a question in retrieving the data from the checkboxes. How do I implement what the user has selected into the if statement.

Thanks in advance.
Marek Krzeminski

Joined: Mar 13, 2011
Posts: 14

I'd use JavaScript to process the user's response.

I use the jQuery framework to make writing JavaScript easier. With it you could do something like:

$( "form input:checkbox").each( function() {
//do what ever you need here per check box object

3D OpenGL, C++ Game Development Video Tutorials @
I agree. Here's the link:
subject: Processing checkboxes data.
jQuery in Action, 3rd edition