标题: 求大神帮忙排错
时间: 2013-08-20
<!DOCTYPE html PUBLIC"-//WAPFORUM//DTD XHTML Mobile 1.0//EN" " http://www.wapforum.org /DTD/xhtml-mobile10.dtd">
<html xmlns=" http://www.w3.org /1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<tittle>DG留言本</tittle>
<script language="JavaScript">
function InputCheck(form1){
if(form1.nickname.value == "")
{
alert("请输入您的昵称。"); form1.nickname.focus();
return (false); } if(form1.content.value == "")
{
alert("留言内容不可为空。"); form1.content.focus();
return (false); }
}
</script>
</head>
<body>
<h3>留言列表</h3><?php
include 'conn.php';
include 'config.php';
$p=$_GET['p']?$_GET['p']:1;
$offset = ($p-1)*$pagesize;
$sql1='select * from guest ORDER BY id DESC LIMIT $offset,$pagesize';
$result=$db->query($sql1);
if(!$result) exit('查询数据库错误');
while($row=$result->fetch_all())
{
$content=nl2br($row['content']);
echo $row['name'].' ';
echo '发表于:'.date("Y-m-d H:i",$row['creattime']).'<br/>';
echo ''.nl2br($row['content']).'<br/>';
if(!empty($row['replytime'])) {
echo '----------------------------<br />'; echo '管理员回复于:'.date("Y-m-d H:i", $gb_array['replytime']).'<br />'; echo nl2br($row['reply']).'<br /><br />';
}echo '<hr/>';
}
$count_result = $db->query("SELECT count(*) FROM guest");
$count_array = $count_result->fetch_all();
$pagenum=ceil($count_array['count(*)']/$pagesize);
echo '共'.$count_array['count(*)'].' 条留言';
if ($pagenum > 1) {
for($i=1;$i<=$pagenum;$i++)
{
if($i==$p) {
echo ' ['.$i.']'; }
else {
echo ' <a href="index.php?p='.$i.'">'.$i.'</a>'; }
}
}
?>
<form id="form1" name="form1" method="post" action="submiting.php" onSubmit="return InputCheck(this)">
<h2>发表留言</h2>
<p>
<label for="title">昵 称:</label><input id="nickname" name="nickname" type="text"/>
<span>(必须填写,不超过16个字符串)</span></p>
<p><label for="title">电子邮件:</label><input id="email" name="email" type="text" /><span>(非必须,不超过60个字符串)</span></p>
<p><label for="title">留言内容:</label><textarea id="content" name="content" cols="50" rows="8"></textarea></p>
<input type="submit" name="submit" value=" 确 定 " /></form>
</body>
</html>
以上是代码,但是,表单部分没有显示,如演示http://dome.poxo.cc这是什么原因呢?局中人看不清,所以请各位看客帮忙看看。『回复列表(4|隐藏机器人聊天)』