I have this code that checks the attendance os students:
$counter = 0;
while($rw = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" .$rw['Name']. "</td>";
echo "<td>" .$rw['student_id']. "</td>";
echo "<td>". '<input type="radio" id="present'.$counter.'" name="optradio'.$counter.'">' ."</td>";
echo "<td>". '<input type="radio" id="late'.$counter.'" name="optradio'.$counter.'">' ."</td>";
echo "<td>". '<input type="radio" id="absent'.$counter.'" name="optradio'.$counter.'">' ."</td>";
echo "<td>".'' ."</td>";
echo "<td>".''."</td>";
echo "<td>". '' ."</td>";
echo "<td>". date('m/d/Y') ."</td>";
echo '</tr>';
$counter++;
}
echo'</tbody>';
echo'</table>';
echo'<div style="float: right; margin-top: 10px; margin-right:10px;">';
echo '<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>';
echo ' ';
echo '<button type="Submit" name="saveAttendance" class="btn btn-primary">Save</button>';
echo '</div>';
How will I save it to my database? I was told that I have to loop it and save it to an array before I could save it but I don't have any idea how. I'm only a beginner. Thank you in advance!