紧急求助留言版问题
这是我的程序,但无论我输什么,提交后都显示
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style34 {font-size: 18px; font-family: "隶书"; font-weight: bold; color: #000000; }
-->
</style>
<link href="xx.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style36 {color: #FF6600}
.style37 {font-size: 18px}
.style38 {
font-family: "宋体";
color: #996600;
}
.style39 {
font-size: 14px;
color: #996600;
}
.style41 {color: #996600}
.style42 {font-size: 18px; color: #996600; }
-->
</style>
<link href="ss.css" rel="stylesheet" type="text/css">
<link href="sss.css" rel="stylesheet" type="text/css">
<link href="xx.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style47 {font-size: 14px}
a:link {
color: #663300;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style48 {font-family: "隶书"}
.style49 {
font-size: 24px;
color: #990066;
font-weight: bold;
}
-->
</style>
<body background="../My%20Pictures/rt261s.jpg">
<table width="800" height="204" border="1" align="center" background="../My%20Pictures/kkk.JPG" >
<tr>
<td width="800" height="198" background="kkk.JPG"> </td>
</tr>
</table>
<table width="800" height="72" border="1" align="center">
<tr background="TW-7010.jpg">
<td width="133" height="66"><div align="center" class="style31 style48"><a href="1.htm" target="_blank" class="style50 style48 style49">首页</a></div></td>
<td width="133"><div align="center" class="style31"><span class="style31 style48"><a href="2.htm" target="_blank" class="style49">关于我们</a></span></div></td>
<td width="133"><div align="center" class="style31"><span class="style31 style48"><a href="301.htm" target="_blank" class="style49">新品展示</a></span></div></td>
<td width="133"><div align="center" class="style31"><span class="style31 style48"><a href="401.htm" target="_blank" class="style49">精品展示</a></span></div></td>
<td width="133"><div align="center" class="style49"><span class="style31"><a href="501.htm" target="_blank" class="style48">特价产品</a></span></div></td>
<td width="133"><div align="center" class="style49"><span class="style31"><a href="6.htm" target="_blank" class="style48">在线留言</a></span></div></td>
</tr>
</table>
<center>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="grayline" bgcolor=#FFFFFF>
<tr><td width="760" align=center>
</a></td>
</tr>
</table>
<div align="left">目前位置:<a href=index.asp>首页</a> > 在线留言 </div></td></tr>
<tr><td width="98%" align="center" height="1" ></td></tr>
<tr><td align=center height=80> </td>
</tr>
<tr bgColor="#ebebeb">
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>姓名:</td>
<td ><input type=text name="UserName" size="30" maxlength=20 >
<font color="#FF0000">* *(长度>=5)</font></td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>邮箱:</td>
<td ><input type=text name="UserMail" size="30" maxlength=20 >
<font color="#FF0000">*</font></td>
</tr>
<tr bgColor="#ebebeb">
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>腾讯QQ:</td>
<td> </td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>留言:<br><font color=red>(200字以内)</font></td>
<td><textarea name="Comments" rows="7" cols="66" ></textarea></td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>头像:</td>
<td><input type="radio" value="1" name="pic"> <img src="pic1.gif" width="67" height="75">
<input type="radio" value="2" name="pic"> <img src="pic2.gif" width="65" height="76">
<input type="radio" value="3" name="pic" > <img src="pic3.gif" width="68" height="86">
<input type="radio" value="4" name="pic"> <img src="pic4.gif" width="71" height="79">
<input type="radio" value="5" name="pic"> <img src="pic5.gif" width="83" height="83">
<br>
<input type="radio" value="6" name="pic"> <img src="pic6.gif" width="72" height="73">
<input type="radio" value="7" name="pic"> <img src="pic7.gif" width="69" height="76">
<input type="radio" value="8" name="pic"> <img src="pic8.gif" width="70" height="75">
<input type="radio" value="9" name="pic"> <img src="pic9.gif" width="64" height="70">
<input type="radio" value="10" name="pic"> <img src="pic10.gif" width="61" height="71">
</td>
</tr>
<tr bgColor="#ebebeb">
<td colSpan="2" height=50 align=center><input type="submit" value="提交留言" name="Submit1" >
<input type="reset" value="重新填写" name="Submit2"></td></tr>
<TR><TD bgcolor=#FFFFFF colspan=2>
</TD>
</TR>
</table>
</form>
<tr><td><br><br><br><br></td></tr>
<tr><td width="98%" align="center" height="1" ></td></tr>
<tr><td><br></td></tr>
</table>
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<% @ language=vbscript%>
<%
dim sname,semail,ssex,sinput,ddate,errormsg,founderror
'表单信息的获取
founderror=false
errormsg=""
sname=request.form("name")
semail=request.form("email")
ssex=request.form("sex")
sinput=request.form("liuyan")
ddate=now()
'表单信息的校验
if sname="" then
founderror=true
errormsg=errormsg+"<li>请输入姓名!</li>"
elseif len(sname)<=5 then
founderror=true
errormsg=errormsg+"<li>姓名长度少于5!</li>"
end if
if instr(semail,"@")=0 then
founderror=true
errormsg=errormsg+"<li>email错误!</li>"
end if
if sinput="" then
founderror=true
errormsg=errormsg+"<li>留言为空!</li>"
elseif len(sinput)>200 then
founderror=true
errormsg=errormsg+"<li>留言长度大于200!</li>"
end if
'表单信息校验结果处理
if founderror then
'表单信息有误,则输入相应错误
response.write errormsg
else
'表单信息校验正确,则入库
set conn=server.createobject("ADODB.connection")
conn.open"DRIVER={Microsoft access driver (*.mdb)};DBQ="& server.mappath(message.mdb)
cmdSQL="insert into liuyan(name,sex,email,content,dateandtime)values('"&sname&"','"&ssex&"','"&semail&"','"&sinput&"','"&sdate&"')"
conn.execute cmdSQL
conn.close
response.write"祝贺!您已经注册成功了!"
end if
%>
</body>
</html>