日期:2014-05-17  浏览次数:20495 次

怎么在页面上固定位置显示数据库的值
是这样,我某一个页面上要显示一个角色对应的四个父亲名(最多也只能是四个)
html代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>旧的回忆F</title>
<link rel="stylesheet" type="text/css" href="../Public/css/old.css">
<style type="text/css">
body,td,th {

0;
font-size: 20px;
color: #673310;
font-family:"楷体";
}
</style>

</head>
<body>
<div id="containt">
<div id="backa">
<table align="center" border="0">
<tr><td>父亲:</td></tr>

</table>
</div>
<div id="backb">
<table align="center" border="0">
<tr><td>父亲:</td></tr>

</table>
</div>
<div id="backc">
<table align="center" border="0">
<tr><td>父亲:</td></tr>

</table>
</div>
<div id="backd">
<table align="center" border="0">
<tr><td>父亲:</td></tr>

</table>
</div>
<div id="work">
<a href=""><img src="../Public/img/mapimg/button/return.gif" /></a>
</div>
</div>
</body>
</html>

数据库中存放该信息的表名叫father,里面有两个字段(user_name,fname)

------解决方案--------------------
url 上出现了id没有?

$query=mysql_query($sql) or die(mysql_error());  //报错了没有