我希望能够单击每个课程并从数据库中获取sec_no,然后根据所单击的课程和sec_no以表格形式显示一些信息(也将从数据库中获取)。 预先感谢!
<body>
<table class="table table-striped">
<thead>
<tr>
<tr>
<th>Course Name</th>
<th>Course Section</th>
</tr>
</tr>
</thead>
<tbody>
<tr>
<?php
$conn = new mysqli( " ", " ", " ", " ");
$query = $conn->query("");
while ($row = mysqli_fetch_array($query)) {
echo "<tr>
<td>" . $row['course'] . "</td>
<td>" . $row['sec_no'] . "</td>
</tr>";
}
?>
</tbody>
</table>