标题: PHP网页编程之一个简略单纯需求注册的留言版法式 [打印本页] 作者: 小女巫 时间: 2015-2-4 00:05 标题: PHP网页编程之一个简略单纯需求注册的留言版法式 大部分语言的基础,不是说c有多好,而是c相对起手容易学,让你认为这个是编程语言, 1.guestbook.php(留言法式)
<html>
<head>
<script language="JavaScript">
<!--
<!--
var hellotext="为了您的最好阅读后果请您利用IE4.0以上的版本和800*600分辩率"
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
window.status = hellotext;
setTimeout("anim()",1);
}
thetext = hellotext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==7) {step=1}
if (step==1)
{window.status='>==='+thetext+'===<'}
if (step==2)
{window.status='=>=='+thetext+'==<='}
if (step==3)
{window.status='>=>='+thetext+'=<=<'}
if (step==4)
{window.status='=>=>'+thetext+'<=<='}
if (step==5)
{window.status='==>='+thetext+'=<=='}
if (step==6)
{window.status='===>'+thetext+'<==='}
setTimeout("anim()",200);
}
// -->
welcometext();
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<title>六合收集留言版</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style type="text/css">
<!--
a:link { font-size: 9pt; color: #FFFFFF}
-->
</style>
<body>
<?
$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 "今朝没有留言!<a href=guestbook.htm>接待您留言!</a>";}