展开全部
首先显示一下数据库62616964757a686964616fe4b893e5b19e31333339666635的数据
页面信息
< html xmlns="http://www.w3.org/1999/xhtml">
< head>
< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
< title>无标题文档
< /head>
< center>
< caption>留言内容
< tr>
编号用户标题内容发表时间< ?php
$link=mysql_connect('localhost','root','123')or die("数据库连接失败");
//连接数据库
mysql_select_db('lyb',$link);//选择数据库
mysql_query("set names utf8");//设置编码格式
$q="select * from content";//设置查询指令
$result=mysql_query($q);//执行查询
while($row=mysql_fetch_assoc($result))//将result结果集中查询结果取出一条
{
echo"
".$row["id"]."".$row["username"]."".$row["title"]."".$row["content"]."".$row["lastdate"]."";}
?>
< /table>
< a href="liuyanban.html">返回
< /body>
< /html>
页面显示效果如下: