这是我用来从数据库中检索数据以供参加的代码。
<?php
while($row4 = mysqli_fetch_array($result4)) {
echo "
<tr>
<td>
<input type='text' name='enrol' value='$row4[enrolment_no]' />
<div class='make-switch switch-small'>
<input type='checkbox' name='attendance' />
</div>
</td>
<td>
<div class='checkbox'>
<label>
<input class='uniform' type='checkbox' name='event'/>
</label>
</div>
</td>
<td>$row4[roll_no]</td>
<td>$row4[stud_fname] $row4[stud_lname]</td>
</tr> ";
}
?>
答案 0 :(得分:0)
<?php
while($row4 = mysqli_fetch_array($result4)) {
echo "
<tr>
<td>
<input type='text' name='enrol' value='".$row4['enrolment_no']."' />
<div class='make-switch switch-small'>
<input type='checkbox' name='attendance' />
</div>
</td>
<td>
<div class='checkbox'>
<label>
<input class='uniform' type='checkbox' name='event'/>
</label>
</div>
</td>
<td>".$row4['roll_no']."</td>
<td>".$row4['stud_fname']."".$row4['stud_lname']."</td></tr>";
}
?>