求助~~联系地址为什么不能写入数据库,还有就是留言内容\回复 怎么改成不顶格
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="conn.asp" -->
<!--#include file="admin/function/displaytm.asp" -->
<%
set rs= Server.CreateObject("adodb.recordset")
sql="select * from basic"
rs.open sql,conn,1,1
%>
<title><%= rs("stname") %></title>
<link href="css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="SelectDate.js"></script>
<script language="JavaScript" type="text/javascript">
function js(){
if(document.form1.nc.value==""){
alert("请输入您的姓名!")
document.form1.nc.focus()
return false
}
if(document.form1.lz.value==""){
alert("请输入您的联系方式!")
document.form1.lz.focus()
return false
}
if(document.form1.dz.value==""){
alert("请输入您的联系地址!")
document.form1.dz.focus()
return false
}
if(document.form1.lb.value==""){
alert("请选择留言类型!")
document.form1.lb.focus()
return false
}
if(document.form1.msg.value==""){
alert("请输入留言内容!")
document.form1.msg.focus()
return false
}
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
.style2 {color: #0000FF}
.style3 {color: #000066}
.style4 {color: #FF0099}
-->
</style>
</head>
<body>
<!--#include file="top.asp" -->
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" id="bj">
<tr>
<td width="190" height="600" valign="top" ><table width="100%" border="0" cellpadding="0" cellspacing="0" id="bj">
<tr>
<td height="5"> </td>
</tr>
</table>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.,0,29,0" width="200" height="300">
<param name="movie" value="dh_2.swf" />
<param name="quality" value="high" />
<embed src="dh_2.swf" quality="high" pluginspage="http://www. type="application/x-shockwave-flash" width="200" height="300"></embed>
</object>
<td height="800" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="lbj">
<tr>
<td height="28" align="left" class="imp"><img src="imgs/news_tt.gif" width="21" height="21" align="absmiddle" />在线留言</td>
</tr>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25" bgcolor="#CCCCCC" class="imp">客户留言</td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="message_js.asp">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td width="120" height="30" align="center">姓名:</td>
<td height="30" align="left"><input name="nc" type="text" id="nc" style=" background:#FFFFFF; color:#333333; height:auto; border:solid 1px #88b5d1" />
<span class="STYLE1">*</span></td>
</tr>
<tr>
<td width="120" height="30" align="center">联系方式:</td>
<td height="30" align="left"><input name="lz" type="text" id="lz" style=" background:#FFFFFF; color:#333333; height:auto; border:solid 1px #88b5d1" /><span class="STYLE1">*</span></td></td>
</tr>
<tr>
<td width="120" height="30" align="center">联系地址:</td>
<td height="30" align="left"><input name="dz" type="text" id="dz" style=" background:#FFFFFF; color:#333333; height:auto; border:solid 1px #88b5d1" /><span class="STYLE1">*</span></td></td>
</tr>
<tr>
<td width="120" height="30" align="center">留言类别:</td>
<td height="30" align="left"><select name="lb" id="lb">
<option value="" selected="selected">==请选择留言类别==</option>
<%
set rs= Server.CreateObject("adodb.recordset")
sql="select * from msg_type order by id desc"
rs.open sql,conn,1,1
while not rs.eof
%>
<option value="<%= rs("id") %>"><%= rs("typ") %></option>
<%
rs.movenext
wend
%>
</select>
<span class="STYLE1">* </span></td>
</tr>
<tr>
<td width="120" height="30" align="center">验证码:</td>
<td height="30" align="left"><input name="yzm" type="text" id="yzm" />
<%
Randomize
a=int((9 - 1 + 1) * Rnd + 1)
b= int((9- 1+ 1) * Rnd + 1)
c= int((9 - 1 + 1) * Rnd + 1)
session("c")=a*b+c
%>
(<font color="red"><%= a %>乘<%= b %>加<%=c%></font>=?)把运算结果填到左边 </td>
</tr>
<tr>
<td width="120" height="30" align="center">留言:</td>
<td height="30" align="left"><textarea name="msg" cols="70" rows="10" id="msg"></textarea></td>
</tr>
<tr>
<td width="120" height="30" align="center"> </td>
<td height="30" align="left"><input type="submit" name="Submit" value="提交" onclick="return js()"/>
<input type="reset" name="Submit2" value="重置" /></td>
</tr>
</table>
</form><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<%
set rs= Server.CreateObject("adodb.recordset")
sql="select msg.* ,msg_type.typ from msg,msg_type where msg.lb=msg_type.id and msg.yz=yes order by msg.id desc"
rs.open sql,conn,1,1
page=Trim(Request.QueryString("page"))
if not ISnumeric(request("page")) or ISempty(request("page")) then page=1
page=cint(page)
if not rs.eof then
rs.pagesize=10
alpgs=rs.pagecount
if page>alpgs then page=alpgs
if page<>0 then
rs.absolutepage=page
else
Response.Write("没有符合条件记录!")
end if
else
Response.Write("<tr><td>数据库中暂无纪录!</td></tr>")
end if
for pages=0 to rs.pagesize-1
if rs.bof or rs.eof then exit for
if pages<>0 then
if pages mod 1=0 then
Response.Write("</tr><tr>")
end if
end if
%>
<tr>
<td height="200" valign="top"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="left" bgcolor="#ECECEC"><img src="/imgs/123.gif" alt="" height="24" width="24" border="0" /><span class="style2">姓名:<%= rs("nc") %></span> 类别:<%= rs("typ") %> 发表于:<%= displaytime(rs("mydate")) %></td>
</tr>
<tr>
<td height="60" align="left" bgcolor="#FFFFFF"><img src="/imgs/20085171520323.png" alt="" height="19" width="19" border="0" /><span class="style3"><%= rs("msg") %></span> </td>
</tr>
<tr>
<td height="30" align="left" bgcolor="#ECECEC"> </td>
</tr>
<tr>
<td height="30" align="left" bgcolor="#CCCCCC"><img src="/imgs/234.gif" alt="" height="24" width="24" border="0" /><span class="STYLE1">管理员回复:</span></td>
</tr>
<tr>
<td height="60" align="left" bgcolor="#ECECEC"><img src="/imgs/20085171520865.png" alt="" height="19" width="19" border="0" /><span class="style4"><%= rs("hf") %></span> </td>
</tr>
</table></td>
</tr>
<%
rs.movenext
next
%>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="center">每页<font color="#FFFFFF" face="impact"><%= rs.pagesize %></font>/共<font color="#FFFFFF" face="impact"><%= rs.recordcount %></font>条记录
<% If page<>1 Then %>
<a href="?page=1&lb=<%= mylb %>">首页</a>
<% End If %>
<% If page>1 Then %>
<a href="?lb=<%= mylb %>&page=<%= page-1 %>">上一页</a>
<% Else %>
上一页
<% End If %>
<% for pages=1 to alpgs %>
<a href="?lb=<%= mylb %>& page=<%= pages %>"><%= pages %></a>
<% next %>
<% If page<alpgs Then %>
<a href="?lb=<%= mylb %>&page=<%= page+1 %>">下一页</a>
<% Else %>
下一页
<% End If %>
<% If page<>alpgs Then %>
<a href="?page=<%= alpgs %>&lb=<%= mylb %>">尾页</a>
<% End If %>
第:<font color="#FFFFFF" face="impact"><%= page %></font>/<font color="#FFFFFF" face="impact"><%= alpgs %></font>页</td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="footer.asp" -->
</body>
</html>