php编写的简单页面跳转功能实现代码_PHP

WBOY
Release: 2016-06-01 11:57:49
Original
712 people have browsed it

不多说,直接上代码
复制代码 代码如下:
//链接数据库'查询
mysql_connect('localhost','username','userpwd')or die("数据库链接失败".mysql_error());
mysql_select_db('库名');
mysql_query('set names utf8');
$sql1="select * from user ";
$query1=mysql_query($sql1);
$count=array();
while($row=mysql_fetch_assoc($query1)){
    $count[]=$row;
}
$totalnews=count($count);
//判断page
if($_GET['page']){
    $page=$_GET['page'];
}else{
    $page=1;
}
$start=($page-1)*$newnum;
   $sql="select * from user limit $start,$newnum";
   $query=mysql_query($sql);
   $ret=array();
   while($row=mysql_fetch_assoc($query)){
       $ret[]=$row;
       }
?>
//表格样式


  
     $value){ ?>
      
          
          
          
          
      
    
    
//页面跳转
          
    
  
删除|修改
首页 上一页 / 下一页 尾页
          


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!