0
這是我在我的房間如何將數據庫數據顯示到其他頁面?
<?php
include'db.php';
$sql=mysql_query("Select*from tb_rooms1");
echo "<div class='container'>";
echo "<div class='scrolltable'>";
echo "<table class= 'table table-striped table-bordered'>";
echo"<th><div align='center'>ID</div></th>";
echo"<th><div align='center'>Image</div></th>";
echo"<th><div align='center'>Room Name</div></th>";
echo"<th><div align='center'>Description</div></th>";
echo"<th><div align='center'>Price Per Night</div></th>";
echo"<th><div align='center'>Status</div></th>";
echo"<th><div align='center'>Reserve</div></th>";
while($row=mysql_fetch_array($sql))
{
@$id=$row['eid'];
echo"<tr align='center'>";
echo"<td><div style='font-size:11px;' align='center'>".$row['roomID']</div></td>";
echo"<td><div style='font-size:11px;' align='center'><img width=72 height=52 alt='Unable to View' src=".$row['image']."></div></td>";
echo"<td><div style='font-size:11px;' align='center'>".$row['name']."</div></td>";
echo"<td><div style='font-size:11px;' align='center'>".$row['description']."</div></td>";
echo"<td><div style='font-size:11px;' align='center'>".$row['price']."</div></td>";
echo"<td><div style='font-size:11px;' align='center'>".$row['status']."</div></td>";
echo"<td><div align='center' style='margin-top:30px'><input style='margin-top:-2px;' type='checkbox'></div></td>";
}
echo"</table>";
echo"</div>";
echo"</div>";
?>
我不知道我怎麼可以顯示我已經選擇了另一頁房間的信息表的代碼。有人能幫我嗎?我
你需要更具體些,你是否想讓每個房間都可以點擊? – Addil