//conn.php
<?php
$conn = @ mysql_connect("localhost", "root", "") or die("数据库链接错误");
mysql_select_db("bbs", $conn);
mysql_query("set names 'GBK'"); ?>//list.php<?php
include("conn.php");
?>
  <table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
  
   <?
   $sql="select * from message order by id desc";
$query=mysql_query($sql); while($row=mysql_fetch_array($query)){
print_r($row);
?>
  <tr bgcolor="#eff3ff">
   <td>标题:<?echo $row[title]?> 用户:<?echo $row[user]?></td>
  </tr>
  <tr bgColor="#ffffff">
   <td>内容:<?echo $row[content]?></td>
  </tr>
  <?
  }
  ?>
  </table>
结果只显示了“标题”,“用户”,“内容”,不能显示具体的内容