一个分页的论坛
-------------------------------论坛--------------------------数据表
create table guest(id int not null auto_increment,Prima(最完善的虚拟主机管理系统)ry key(id),title varchar(50),email varchar(30),homepage varchar(30),name varchar(30),text text,relay int,r_time date)
create table relay(id int not null auto_increment,Prima(最完善的虚拟主机管理系统)ry key(id),title int,email varchar(30),name varchar(30),text text)
-------------------------index.php(做为现在的主流开发语言)--------------------------
<STYLE>TD{FONT-FAMILY:"宋体";FONT-SIZE:13pt}BODY{FONT-FAMILY:"宋体";FONT-SIZE:13pt}SELECT{FONT-FAMILY:"宋体";FONT-SIZE:13pt}A{COLOR:blue;FONT-FAMILY:"宋体";FONT-SIZE:13pt;TEXT-DECORATION:none}</STYLE>
<div> <p align=center><font size=14><b>网站完全手册</font></p> </div>
<?php(做为现在的主流开发语言)
$db =MySQL(和PHP搭配之最佳组合)_connect("localhost", "****","****");
MySQL(和PHP搭配之最佳组合)_select_db("****",$db);
@$result = MySQL(和PHP搭配之最佳组合)_query("SELECT * FROM guest order by id desc",$db);
$i=0;
while($myrow = MySQL(和PHP搭配之最佳组合)_fetch_row($result)) {
$guestbook[$i][0] = $myrow[0];
$guestbook[$i][1] = $myrow[1];
$guestbook[$i][2] = $myrow[2];
$guestbook[$i][3] = $myrow[4];
$guestbook[$i][4]=$myrow[6];
$guestbook[$i][5]=$myrow[7];
$i++;
} //读入数组
MySQL(和PHP搭配之最佳组合)_close($db) ;
echo "-----------------------------共[";
if ($q!="") {
$page = $q;
} else {
$page = 0;
}
$i=count($guestbook);
$msgnum=20; // 每页20笔
$start = $page * $msgnum;
$end = $start + $msgnum;
if ($end > $i) $end=$i;
$totalpage=$i/$msgnum;
for ($i=0; $i<$totalpage; $i++) {
if ($i!=$page) {
echo "<a href=index.php(做为现在的主流开发语言)?q=$i> $i</a>";
} else {
echo " $i";
}
}
echo "]页-----------------------------<br>"; printf("<p align=right><a href=111.php(做为现在的主流开发语言)>添加主题</a></p>");
echo "<br>";
echo "<table width=700 hight=560 align=center border=1 >";
echo "<tr>";echo "<td align=center width=200 bgcolor=aaaaaa border=1 style=border: 1px solid rgb(3,2,1)>主题</td>";
echo "<td align=center width=200 bgcolor=aaaaaa border=1 style=border: 1px solid rgb(3,2,1)>电子邮件</td>";
echo "<td align=center width=80 bgcolor=aaaaaa border=1 style=border: 1px solid rgb(3,2,1)>呢称</td>";
echo "<td align=center width=60 bgcolor=aaaaaa border=1 style=border: 1px solid rgb(3,2,1)>回复</td>";
补充:Web开发 , php ,