<?php include("conn.php"); ?>
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
$sql = mysql_query("select count(*) as num1 from usertable");
while($num1 = mysql_fetch_array($sql))
{
$recordcount=$num1["num1"];
}
$pagesize=2;
$pagecount=$recordcount/$pagesize;
if($_GET["page"]=="")
{
$page=1;
}
else
{
$page=$_GET["page"];
if($page<1)
{
$page=1;
}
if($page>$pagecount)
{
$page=$pagecount;
}
}
$i=$pagesize*($page-1);
echo "总记录:".$recordcount."条<br>";
echo "一共:".$pagecount."页<br>";
$reault = mysql_query("select * from usertable limit ".$i.",".$pagesize);
while($row = mysql_fetch_array($reault))
{
echo $row["id"]." ".$row["username"].$row["sex"]."<br>";
}
?>
<br />
<a href="conn.php?page=1">首页</a> <a href="conn.php?page=<?php echo $page-1 ?>">上一页</a>,<a href="conn.php?page=<?php echo $page+1 ?>">下一页</a>,<a href="conn.php?page=<?php echo $pagecount; ?>">尾页</a>
?>
</body>
这里报错:Parse error: syntax error, unexpected ';' in D:\php\PHPnow-1.5.5_1\htdocs\zhizuo\conn.php on line 16
找不到是什么原因,帮帮忙!