PHP development small forum tutorial forum details

Create forums.php file

This page is mainly to transfer data from our "tiopic" table

Considering that if we have a lot of data, the page display will not be complete, so we did paging

Using our table+css layout, the rendering is as follows

00.jpg

##The code is as follows

$total_page ? $total_page:$page;//当下一页数大于最大页数时的情况 //分页设置初始化 $start=($page-1)*$perpage; $sql="select * from tiopic order by id desc limit $start ,$perpage"; $que=mysqli_query($conn,$sql); $sum=mysqli_num_rows($que); ?>     帖子  
$gb_name-->>$forum_name"; ?>
0) { while($row=mysqli_fetch_array($que)) { ?> "; } ?>
帖子列表 [返回 ]
主题列表 作者 最后更新
本版块没有帖子.....
">首页   上一页 $i"; }else{ echo "$i"; } } ?>   下一页   ">末页   


Continuing Learning
||
$total_page ? $total_page:$page;//当下一页数大于最大页数时的情况 //分页设置初始化 $start=($page-1)*$perpage; $sql="select * from tiopic order by id desc limit $start ,$perpage"; $que=mysqli_query($conn,$sql); $sum=mysqli_num_rows($que); ?> 帖子
$gb_name-->>$forum_name"; ?>
0) { while($row=mysqli_fetch_array($que)) { ?> "; } ?>
帖子列表 [返回 ]
主题列表 作者 最后更新
本版块没有帖子.....
">首页 上一页 $i"; }else{ echo "$i"; } } ?> 下一页 ">末页
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!