- 论坛徽章:
- 0
|

首页中要显示的内容代码
<?php
$query = "select distinct year,sign from zk_db.zzdj";
$result = mysql_query ($query);
while ($rows = mysql_fetch_array ($result))
{
echo "<a href='zzdj/zzdjbody.php?sign=".$rows["sign"]."' target=_blank>".$rows["year"].$rows["sign"]."</a><br>";
}
?>
链接到的页面代码
<?php
if(isset($_GET["sign"])){
$result=mysql_query("select * from zk_db.zzdj where sign = ".$_GET["sign"]);
$total=mysql_num_rows($result);
pageft($total,25);
$result=mysql_query("select * from zk_db.zzdj where sign = ".$_GET["sign"].
"limit $firstcount,$displaypg" ;
while($row=mysql_fetch_array($result)){
echo "<table border='0' width='430'>
<tr>
<td width='330' align='left'>".$row["name"]."</td>
<td width='100'>".$row["no"]."</td>
</tr>
</table>";
break;}
}
?>
sign字段的内容是汉字,如:已通过
用以上代码,显示不出任何内容.
[ 本帖最后由 HonestQiao 于 2006-6-22 16:22 编辑 ] |
|