我的问题是如何从数据库中获取记录到 dtr 表单的特定日期。例如,当员工在第 3 天缺席时,它会跳过第 3 天并直接跳到员工在场的另一天。喜欢这个https://www.youtube.com/watch?v=g9JUN6TBrak
<CAPTION><EM>
<p class="civil_service_title">Civil Service Form No. 48</p>
<p class="dtr">DAILY TIME RECORD </p>
<p class="circles">-----o0o-----</p>
<p class="line1">_____________________________________</p>
<p class="name"> (Name)</p>
<p class="civil_service_title2"> For the month of______________________________________<br>
Official hours for arrival <br>and departure
Regular days________________<br><br>
Saturdays___________________ </p>
</EM></CAPTION>
<form method="POST">
<table border="1">
<tr><th rowspan="2">Day<th colspan="2">A.M.
<th colspan="2">P.M.<th colspan="2">Undertime
<TR><th>Arrival<th>Departure
<th>Arrival<th>Departure
<th>Hours<th>Minutes
<?php
$days = 31;
for($i = 1;$i <= $days;$i++){
$fetch = mysqli_fetch_array($sql);
?>
<tr>
<th><input type="hidden" name="hidden" value="<?php echo $i;?>"><?php echo $i;?></th>
<td>
<?php
echo $fetch['time_in_am'];
?>
</td>
<td>00:00</td>
<td>00:00</td>
<td>00:00</td>
<td>00:00</td>
<td>00:00</td>
</tr>
<?php
}
?>
<tr><th colspan="5">
<div> Total </div> <td><td>
</table>
</form>