请各位大虾帮忙,我的问题是下面的代码,我不知道怎么样改正,请各位检查之后,把错误的改正过来,我一定给分.

xbelm 2002-02-14 03:02:27
"这下里写的是我的主页的源代码",你请看看我的连接语言和表单有没有错误,如有错,请改正,谢谢!


<%
on error resume next
set connection=createobject("adodb.connection") '建立连接对象
connection.open UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=E:\xbelm
DBQ=E:\xbelm\xbelm.mdb

'打开连接。其中connectionstring就是原来说的那个连接串
connectionstring
connection.execute "insert into xbelm.mdb(UserName,Password,联系电话)
values(UserName,Password,phoh)"
if err<>0 then
response.write "错误"
else
response.write "完成"
end if
connection.close
set connection=nothing
%>
<html>
<head>
<title>谢波的网页_____校友身份认证</title>
</head>
<bady>
<Center><h2><color="#00ffbb">校友身份认证</color></h2></Center>
<form action="xbelm.htm" Method="post">
用户名:<input type=text size=10 name=UserName>
密码:<input type=password size=10 name=Password>
联系电话:<input type=text size=10 name=phoh>
<input type=Submit Value="确认">
<input type=Reset Value="重写">
</form>
</bady>
</html>



这下面的是我的主页提交后的页面

<html>
<head>
<title>谢波的网页_____E-mail</title>
</head>
<bady>
<center><h2><color="#ooffdd">恭喜你!通过了校友身份认证,你是真正的经贸学校的学生!</color></h2></center>
</bady>
</html>
...全文
38 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
希偌 2002-02-16
  • 打赏
  • 举报
回复
主页index.html
*******
<html>
<head>
<title>谢波的网页_____校友身份认证</title>
</head>
<bady>
<Center><h2><color="#00ffbb">校友身份认证</color></h2></Center>
<form action="xbelm.asp" Method="post">
用户名:<input type=text size=10 name=UserName>
密码:<input type=password size=10 name=Password>
联系电话:<input type=text size=10 name=phoh>
<input type=Submit Value="确认">
<input type=Reset Value="重写">
</form>
</bady>
</html>
**********
接收,处理数据的表单xbelm.asp
**********


<% @ language=vbscript %>
<%
on error resume next
set conn=createobject("adodb.connection") '建立连接对象
conn="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("xbelm.mdb")
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25

'conn.execute "create table tablename(UserName varchar(50),Password varchar(50),联系电话 varchar(50))"插入前需要先建立表,只需要建立一次
conn.execute "insert into tablename(UserName,Password,联系电话)
values('"&request("UserName")&"','"&request("Password")&"','"&request("phoh")&"')"
if err<>0 then
response.write "错误"
else
response.write "完成"
end if
conn.close
set conn=nothing
%>
希偌 2002-02-16
  • 打赏
  • 举报
回复
<% @ language=vbscript %>
<%
on error resume next
set conn=createobject("adodb.connection") '建立连接对象
conn="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("xbelm.mdb")
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25

'conn.execute "create table tablename(UserName varchar(50),Password varchar(50),联系电话 varchar(50))"插入前需要先建立表,只需要建立一次
conn.execute "insert into tablename(UserName,Password,联系电话)
values('"&request("UserName")&"','"&request("Password")&"','"&request("phoh")&"')"
if err<>0 then
response.write "错误"
else
response.write "完成"
end if
conn.close
set conn=nothing
%>
<html>
<head>
<title>谢波的网页_____校友身份认证</title>
</head>
<bady>
<Center><h2><color="#00ffbb">校友身份认证</color></h2></Center>
<form action="xbelm.htm" Method="post">
用户名:<input type=text size=10 name=UserName>
密码:<input type=password size=10 name=Password>
联系电话:<input type=text size=10 name=phoh>
<input type=Submit Value="确认">
<input type=Reset Value="重写">
</form>
</bady>
</html>



这下面的是我的主页提交后的页面

<html>
<head>
<title>谢波的网页_____E-mail</title>
</head>
<bady>
<center><h2><color="#ooffdd">恭喜你!通过了校友身份认证,你是真正的经贸学校的学生!</color></h2></center>
</bady>
</html>
lihaitaoami 2002-02-16
  • 打赏
  • 举报
回复
username=trim(request.form("username"))
password=trim(request.form("password"))
phoh=trim(request.form("phoh"))
connection.execute "insert into xbelm.mdb(UserName,Password,联系电话)
values('" & UserName & "','" & Password & "','" & phoh & "')"
希偌 2002-02-15
  • 打赏
  • 举报
回复
<%
on error resume next
set conn=createobject("adodb.connection") '建立连接对象
conn="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("xbelm.mdb")
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25

'conn.execute "create table tablename(UserName varchar(50),Password varchar(50),联系电话 varchar(50))"插入前需要先建立表,只需要建立一次
conn.execute "insert into tablename(UserName,Password,联系电话)
values('"&UserName&"','"&Password&"','"&phoh&"')"
if err<>0 then
response.write "错误"
else
response.write "完成"
end if
conn.close
set conn=nothing
%>
<html>
<head>
<title>谢波的网页_____校友身份认证</title>
</head>
<bady>
<Center><h2><color="#00ffbb">校友身份认证</color></h2></Center>
<form action="xbelm.htm" Method="post">
用户名:<input type=text size=10 name=UserName>
密码:<input type=password size=10 name=Password>
联系电话:<input type=text size=10 name=phoh>
<input type=Submit Value="确认">
<input type=Reset Value="重写">
</form>
</bady>
</html>



这下面的是我的主页提交后的页面

<html>
<head>
<title>谢波的网页_____E-mail</title>
</head>
<bady>
<center><h2><color="#ooffdd">恭喜你!通过了校友身份认证,你是真正的经贸学校的学生!</color></h2></center>
</bady>
</html>

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧