<?php
$conn = mysql_connect("localhost","","") or die("链接数据库失败");
mysql_select_db("test");
mysql_query("set names 'utf8'");
$sql = "select * from movie";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $row['id'] ?></td>
<td><?php echo $row['moviename'] ?></td>
<td><?php echo $row['actor'] ?></td>
<td><?php echo $row['type'] ?></td>
<td><?php echo $row['intro'] ?></td>
<td> <a href="detail.php?stuid=<?php echo $row['dirctor'] ?>">
<?php echo $row['dirctor'] ?>
</a>
</td>
</tr>
<?php
}
?>