0
我正在制作一个使用PHP根据搜索条件显示预订的网站。我为用户提供更改预订的功能。该网站显示符合搜索条件的所有预订的列表,显示'日期','房间'&'描述','期间'和'teacherinitials'。在每一行上,我都有一个读取“chage”的按钮。我希望用户点击该按钮并将您带到可以更改预订的网页。我希望将他们点击的行中的数据发送到该网页。使用PHP将数据发送到HTML而不使用表单
我读过你不能在表格中使用表格。我能做什么?
//Start table
echo "<table>";
echo "<tr><th>Date</th><th>Period</th><th>Room</th><th>Teacher Initials</th><th></th></tr>";
// Loop through database
while ($row = $result->fetch_assoc()) {
$date = $row['date'];
$period = $row['period'];
$roomID = $row['roomID'];
$teacherinitials = $row['teacherinitials'];
$sql2="SELECT room, description FROM Rooms WHERE roomID = '$roomID'";
$res=mysqli_query($con,$sql2);
while ($row2 = $res->fetch_assoc()) {
$room = $row2['room'];
$description = $row2['description'];
}
// Show entries
echo "<tr>
<td>".$date."</td>
<td>".$period."</td>
<td>".$room." (".$description.")</td>
<td>".$teacherinitials."</td>
<td> <a id=\"change\" href=\"change.php\">Change</a> </td>
</tr>";
}
echo "</table>";
}
你甚至试过吗?你在哪里读过你不能在表格内使用表格?为什么要将表格插入到表格中,难道你不能将表格放入每个按钮上带有不同标识选项的表格中吗? – feeela
请注意,ID是唯一的。您不能插入多个具有相同ID的按钮/链接:' feeela