这个php翻页程序错在哪儿

来源:百度知道 编辑:UC知道 时间:2024/05/16 23:22:44
页面出错了,不知道是什么原因?
<?php
include ("head.php");
?>
<?php
include ("conn.php");

$nump=mysql_query("select * from message");
$num=mysql_num_rows($nump);
$page=1;
$page=$_GET[page];
$compute=($page-1)*5;
$url="list.php";
$select="select * from message limit $compute,5";
$table=mysql_query($select);
while($row=mysql_fetch_array($table)){
?>

<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef" >
<tr bgcolor="#eff3ff">
<td>用户名:<?=$row[user]?>标题:<?=$row[title]?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?=code($row[content]);?>日期:<?=$row[datetime]?></td>
</tr>

</table>

<?

<?php
include ("head.php");
?>
<?php
include ("conn.php");

$nump=mysql_query("select * from message");
$num=mysql_num_rows($nump);
$page=$_GET['page'];
if(!$page)
{
$page=1;

}

$compute=($page-1)*5;//.............
$url="list.php";
$select="select * from message limit $compute,5";
$table=mysql_query($select);
while($row=mysql_fetch_array($table)){
?>

<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef" >
<tr bgcolor="#eff3ff">
<td>用户名:<?=$row[user]?>标题:<?=$row[title]?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?=code($row[content]);?>日期:<?=$row[datetime]?></td>
<