注意:未定义的索引:第26行的C:\ xampp \ htdocs \ StudentAttendanceSystem \ show_attendance.php中的日期
<?php $result=mysqli_query($con,"SELECT * FROM attendance_records where date='$_POST[date]'"); //this is line 26
$serialnumber=0;
$counter=0;
while($row=mysqli_fetch_array($result))
{
$serialnumber++; ?>
<tr>
<td> <?php echo $serialnumber ?> </td>
<td> <?php echo $row['student_name'] ?> </td>
<td> <?php echo $row['id'] ?> </td>
<td> <?php echo $row['roll_number'] ?> </td>
<td>
<input type="radio" name="attendence_status[<?php echo $counter; ?>]"
<?php if($row['attendence_status']=="Present")
echo "checked=checked";
?> value="Present">Present
<input type="radio" name="attendence_status[<?php echo $counter; ?>]" <?php if($row['attendence_status']=="Absent")
echo "checked=checked";
?> value="Absent">Absent
</td>
</tr>
<?php
$counter++;
}
?>
它显示未定义的索引:第一行的日期
<?php $result=mysqli_query($con,"SELECT * FROM attendance_records where date='$_POST[date]'");
我在网上找不到任何解决方案,所以也许有人可以帮助我。