查看: 4166|回复: 3

[问与答] 红体的地方是错误的 提示参数不正确 怎么修改啊 求改

[复制链接]
美喵 发表于 2015-5-28 14:43:35 | 显示全部楼层 |阅读模式
<! --# include file="conn.asp"-->
<%
cname=request.form("cname")
ctel=request.form("ctel")
cemail=request.form("cemail")
caddress=request.form("caddress")
ccontent=replace(request.form("ccontent"),vbcrlf,"/")
if cname<>""then
sql="select * from gbook"     '连接对应的数据表
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew    '添加新字段
rs("name")=cname
rs("tel")=ctel
rs("email")=cemail
rs("address")=caddress
rs("content")=ccontent
rs.update
response.redirect "lyok.asp"    '重定向到留言成功提示窗口
rs.close
end if
%>
<html>
<head>
<style type="text/css">
<! --
td    {font-size:14px;line-height:17px}
body   {font-size:14px;line-height:17px}
p      {margin-top:1;margin-bottom:1}
.style1{color:#D4D0C8}
-->
</style>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<title>asp动态程序──简单留言板</title>
<script language="javascript">
<!--
function checkadd()
{
if(document.postart.cname.value.length<1)
{
alert("请输入昵称!");
document.postart.cname.focus();
return false;
}
if(document.postart.ccontent.value.length<1)
{
alert("请输入留言!");
document.postart.ccontent.focus();
return false;
}
}
-->
</script>
</head>
<body>
<div align="center" style="width:720;height:500">
<form action=""method="post" name="postart">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="280">
<tr>
<td><div align="center">简单留言本</div></td>
</tr>
<tr>
<td width="70%" align="right" valign="middle" height="99">
<p align="left">昵 &nbsp;&nbsp;称:<input type="text" name="cname" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">电 &nbsp;&nbsp;话:<input type="text" name="ctel" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">E-mail:<input type="text" name="cemail" size="30" maxlength="50" style="border: 1 solid #000000"></p>
<p align="left">主&nbsp;&nbsp;页:<input type="text" name="caddress" size="30" maxlength="50" style="border: 1 solid #000000" value="http://"></p>
</td>
</tr>
<tr>
<td width="70%" align="right" valign="top" height="27">
<p align="left">留言内容:</td>
</tr>
<tr>
<td width="70%" align="right" valign="top" height="22">
<p align="left"><textarea rows="4" name="ccontent" cols="49" style="border:1 solid #000000"></textarea></td>
</tr>
<tr>
<td width="100%" align="right" height="40" colspan="2">
<p align="left"><input type="submit" value="提交" name="submit">
<input type="reset" value="取消" name="reset">
<input type="button" value="返回" name="back">
</td>
</tr>
</table>
</form>
<%
sql="select * from gbook order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
i=0
if rs.eof then
response.write "暂无留言!"
else
 楼主| 美喵 发表于 2015-5-28 15:18:44 | 显示全部楼层
为什么没有人呢   急急急啊 !!!!求大神呢
ttasp 发表于 2015-5-28 15:33:44 | 显示全部楼层
回复 2# 美喵


联系客服吧
冷月无声 发表于 2015-6-3 09:35:34 | 显示全部楼层
回复 1# 美喵


    听版主的吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号