$PAGESIZE=5; $db=mysql_connect("localhost","root",""); mysql_select_db("lyanban",$db); $result=mysql_query("SELECT * FROM message order by date desc",$db); $rowcount=mysql_num_rows($result); $PAGES=CEIL($rowcount/$PAGESIZE); if($rowcount==0) {echo "目前没有留言!欢迎您留言!";}
if($rownum == "") { $rownum = 1;
} $AA=CEIL($rownum/5); $i=0 ; echo "
共有留言:$rowcount 条 共:$PAGES 页 现在是第 $AA 页
"; echo ""; while ($myrow=mysql_fetch_array($result)){ $i++; if(($i>=$rownum)&&($i<$rownum+5)){ echo "
mysql_connect("localhost","root","") or die("无法连接数据库,请重试");
mysql_select_db("lyanban") or die("无法选择数据库,请重试"); $query="select password from tb where username='$username'"; $result=mysql_query($query); $numrows=mysql_num_rows($result); if($numrows!=0) {echo '已有人注册此名,请重新选择名字!返回';} else {$query="insert into tb(username,password) values('$username','$password')"; mysql_query($query); echo '注册成功'; echo '请登录!';} ?> 以下是两个配套的HTML: 1。留言网页
天地网络留言版欢迎您留言!
天地网络留言版测试版
2.注册程序
registe
用户注册
如需要ZIP文件可给我来信。tandinet@163.net
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
http://www.bkjia.com/PHPjc/316869.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316869.htmlTechArticle1.guestbook.php(留言程序) html head script language=JavaScript !-- !-- var hellotext=为了您的最佳浏览效果请您使用IE4.0以上的版本和800*600分辨率 var th...
Statement:
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