我有这个代码来检查出勤学生:
$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>';
如何将其保存到我的数据库?有人告诉我,我必须将它循环并保存到阵列才能保存,但我不知道如何。我只是个初学者。先感谢您!