I've updated the attendance.sql and the attendance form (index.php), but when I tried to update the values (e.g. present and late), it cannot work.
And also, the checkbox says it's all ticked even the values are different (lines 61 - 63 of index.php)

Can help me?

Download: https://drive.google.com/open?id=0B07_pOHhTox3bTN1Z21HRlR2TEE
Inside there is the database table called attendance.sql. You need xampp and you must import the table (attendance.spl) in phpmyadmin.

Hi

And also, the checkbox says it's all ticked even the values are different (lines 61 - 63 of index.php)

what do you mean?checked is a boolean attribute, which means:

A number of attributes are boolean attributes. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.

The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.

Source: https://developers.whatwg.org/common-microsyntaxes.html#boolean-attribute

so in order to set a checkbox you have to verify the value returned by the row and decide if you want to include the attribute, for example:

<input type="checkbox" name="present" id="present"<?php echo $row['present'] > 0 ? ' checked':'';?>>

What about the update problem? Please check line 85.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.