<?php
mysql_connect("localhost","root","");
mysql_select_db("cinema");
$_sql="select * from `t_hall`";
mysql_query("set names utf8");//编码设置为utf8
$query=mysql_query($_sql);
echo "<table align='center' border='1' cellspacing='0' width='550' >";
echo "<tr><td>影厅编号</td><td>大厅名</td><td>座位行</td><td>座位列</td></tr>";
while($row=mysql_fetch_array($query))
{
//从数据库查询出来的字段
//将数据放到html的表格中
echo "<tr onclick='GetText()'><td>{$row['HID']}</td><td>{$row['HHall']}</td><td>{$row['HSeatline']}</td><td>{$row['HSeatrow']}</td></tr>";
}
echo "</table>";
?>