PHP分页,有代码帮看一下.点击分页获取值失效了.大大帮忙

WBOY
Release: 2016-06-13 13:45:11
Original
1209 people have browsed it

PHP分页求助,有代码帮看一下.点击分页获取值失效了在线等....大大帮忙

$conn=mysql_connect("localhost","root","toma123") or die("连接错误");
mysql_select_db("cs",$conn);
mysql_query("set names 'GBK'");
mysql_query("set characher set gb2312");
mysql_query("set names gb2312");



$tt=$_GET['tt'];



if($Submit){
$sql="select * from ud8 where sessionm = '$tt'";
echo $sql;

$result=mysql_query($sql) or die ("$sql");

$sst=mysql_fetch_array($result);

$num=mysql_num_rows($result); //统计行数

$pages=ceil($num/5); //总页数

$page=$_GET['page']; //获得page,如果没有设置或者page=0,把$page=1;

if($page=="")
{  
$page=1;  
 
}

$start=($page-1)*5;

$sql="select * from ud8 where sessionm like '%$tt%' limit ".$start.",". 5 ;


$query=mysql_query($sql) or die($sql);

?>


while($sumpage=mysql_fetch_array($query))
{
$XX=" PHP分页,有代码帮看一下.点击分页获取值失效了.大大帮忙 ";

$id=$sumpage['id'];  

?>















公司名称
图片缩略图
简介
操作


 


}



if($num!=0)
{
if($page!=1)
{

"首页";
}else 
{
"首页\t";  
}
if($page>1)
{
"上一页\t";
}else
{
"上一页\t";
}  
if($page {
"下一页\t";
}else 
{
"下一页\t";
}  
if($page!=$pages )
{
"尾页\t";


}else 
{
"尾页\t";
}
}else 
{
"目前没有记录!!";
}

}

?> 
  
  



 
 
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!