标题:帮忙看下吧。哥哥姐姐们
只看楼主
wuhaihua
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-11-10
 问题点数:0 回复次数:2 
帮忙看下吧。哥哥姐姐们

<% @ language=vbscript %>
<%
name=request.form("name")
passwd=request.form("passwd")


set conn =Server.Createobject("adodb.connection")
conn.open("driver={Microsoft access driver (*.mdb)}; dbq="+Server.Mappath("user.mdb"))
set rs =Server.Createobject("adodb.recordset")
sql="密码表"
rs.open("select name.passwd.type from sql where name="name")

if rs.eof then
response.write"错误的用户名或密码"
rs.close
set rs=nothing
rs.close
set conn=nothing
response.end
end if
if not(rs("passwd")=passwd)then
response.write "错误的用户名或密码"
rs.close
set rs =nothing
conn.close
set conn=nothing
response.end
end if
session("username")=rs("name")
session("usertype")=rs("type")
rs.close
set rs=nothing
sql="update visit set visitnum=visitnum+1"
conn.execute spl
conn.close
set conn=nothing
response.redirect"123.html"
%>
帮我看下那里错了谢谢了

搜索更多相关主题的帖子: 密码 sql Microsoft access 用户名 
2005-11-24 18:37
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
得分:0 
rs.open("select name.passwd.type from sql where name="name")
rs.open("select name,passwd,type from 密码表 where name="name")'(不要用中文)
================
rs.close
set rs=nothing
rs.close
set conn=nothing''多了


可能还有

2005-11-24 18:43
caiyakang
Rank: 2
等 级:新手上路
威 望:5
帖 子:2111
专家分:0
注 册:2005-3-24
得分:0 

<% @ language=vbscript %>
<%
name=request.form("name")
passwd=request.form("passwd")


set conn =Server.Createobject("adodb.connection")
conn.open("driver={Microsoft access driver (*.mdb)}; dbq="+Server.Mappath("user.mdb"))
set rs =Server.Createobject("adodb.recordset")
sql="密码表"
rs.open "select name,passwd,type from sql where name="&name,conn,1

if rs.eof then
response.write"错误的用户名或密码"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
if not(rs("passwd")=passwd)then
response.write "错误的用户名或密码"
rs.close
set rs =nothing
conn.close
set conn=nothing
response.end
end if
session("username")=rs("name")
session("usertype")=rs("type")
rs.close
set rs=nothing
sql="update visit set visitnum=visitnum+1"
conn.execute sql
conn.close
set conn=nothing
response.redirect"123.html"
%>


中国人的财富网:http://www..cn/
2005-11-24 18:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-35047-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043377 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved