header('Content-Type: text/html; charset=utf-8');
?>
被举报的评论:
$link=mysql_connect("localhost:3306","root","")or die("连接失败");
mysql_select_db("5media") or die("不存在该数据");
mysql_query("set names utf8");
$re=mysql_query("select * from 5m_pinglun");
$zong=mysql_num_rows($re); //总记录数
$pages=ceil($zong/5); //总页数
$yeshu=1; //当前页
if(isset($_GET['curr']))
{
$yeshu=$_GET['curr']; //当前第几页
}
$num2 = array();
$start=($yeshu-1)*5; //开始
$sql="select * from 5m_pinglun limit ".$start." ,5"; //分页查询!
$result=mysql_query($sql);
while($row=mysql_fetch_row($result))
// unset($row[0]);
// unset($row[5]);
echo '
/* foreach($row as $value)
echo "
}*/
// $num2=$row[0];
// echo "
//echo $num2;
} //echo $num2;
全删
共为".$pages.""?>页共有".$zong.""?>条当前为第".$yeshu."" ?>页
echo "";
for($i=1;$i<=$pages;$i++)
if($yeshu==$i)
echo "".$i."";
else
echo " ";
if($yeshu==1)
echo "首页 上一页 ";
echo "首页 ";
echo "上一页 ";