As I am doing a application on attendance management where I need to store the details by using check boxes I am unable to store the details of check boxes where it will be generated as present or absent in database
Can anyone help me to find out this

1 Week
Discussion Span
Last Post by tarun_6

I'd start by learning Java. Then SQL. When you've learned Java and SQL, then learn HTML. Now you've mastered those relatively simple subjects, just learn all of the glue that connects them together. Once you've done that, it's quite simple:

Your attendence is probably represented by a join table; a student attends a lesson. so your attendance table will contain student_id and lesson_id.

Now, on your HTML form you should generate a list of checkboxes for every student who might attend the class (probably based on their subject and grade, or whatever). The checkbox's value should equal the student's ID:

<input type="checkbox" name="attendance" value="2345"/>

When the form is submitted, only the checked checkboxes that are checked (i.e. those who have attended the lesson) will be included in the form data. Save each of the IDs you recieve as a row in the attendance table. Easy.


How to write the code to save the check box

Votes + Comments
Teach a man to fish, etc.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.