急 页面是这样的:名称 所用媒体 用户名 频道名称 状态 操作 我要把数据库里的信息这样分页显示出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?if(!isset($current_page)) $current_page = 1;$page_size = 10; //每页显示的记录数$begin_page = ($current_page - 1) * $page_size; $resutl = mysql_query("select count(*) from dbtable");$record_num = mysql_num_rows($result);$total_pages = ceil($record_num / $page_size); //总页数$result = mysql_query("select * from dbtable limit $begin_page,$page_size");echo "<table>";while($rows=mysql_fetch_array($result)){ echo "<tr><td>".$rows[名称]." ".$rows[所用媒体]." ".$rows[用户名]." " .$rows[频道名称]." ".$rows[状态]." ".$rows[操作]."</td></tr>"}echo "</table>";$up_page = $current_page-1;$next_page = $current_page+1;if($current_page!=1) echo "<a href=".$PHP_SELF."?current_page=1>首页</a>";if($current_page>1) echo "<a href=".$PHP_SELF."?current_page=".$up_page.">上一页</a>";if($current_page<$total_pages) echo "<a href=".$PHP_SELF."?current_page=".$next_page.">下一页</a>";if($current_page != $total_pages) echo "<a href=".$PHP_SELF."?current_page=".$total_pages.">末页</a>";?> php项目----抓取网页视频地址问题(请教正则表达式) 跪求解答 服务器网站根目录在哪 经典问题如何经典解决PHP FOR LINUX? 正则替换 新手问题,进! phper每日一题,每日一提高 PHP 整合 Java 问题,高分求解. 如何取得一个形如链接http://localhost/download?id=5&name=123.dat的下载地址,详细见内 win2003下安装phpmyadmin的问题 初次使用PHP请教,关于表单提交后找不到变量的问题 着个函数什么意思? 关于表单提交查询问题
if(!isset($current_page)) $current_page = 1;
$page_size = 10; //每页显示的记录数
$begin_page = ($current_page - 1) * $page_size;
$resutl = mysql_query("select count(*) from dbtable");
$record_num = mysql_num_rows($result);
$total_pages = ceil($record_num / $page_size); //总页数
$result = mysql_query("select * from dbtable limit $begin_page,$page_size");echo "<table>";
while($rows=mysql_fetch_array($result)){
echo "<tr><td>".$rows[名称]." ".$rows[所用媒体]." ".$rows[用户名]." " .$rows[频道名称]." ".$rows[状态]." ".$rows[操作]."</td></tr>"
}
echo "</table>";$up_page = $current_page-1;
$next_page = $current_page+1;
if($current_page!=1)
echo "<a href=".$PHP_SELF."?current_page=1>首页</a>";
if($current_page>1)
echo "<a href=".$PHP_SELF."?current_page=".$up_page.">上一页</a>";
if($current_page<$total_pages)
echo "<a href=".$PHP_SELF."?current_page=".$next_page.">下一页</a>";
if($current_page != $total_pages)
echo "<a href=".$PHP_SELF."?current_page=".$total_pages.">末页</a>";
?>