我的登陆代码有什么问题?

yqyzzy 2003-10-11 12:37:38
<%user=trim(request.form("user"))
pwd=trim(request.form("pwd"))
if user<>"" and pwd<>"" then%>
<!--#include file="dbpath.asp"-->
<% set rs=server.createobject("adobe.recordset")
sql = "seletct * from admin where user='"&user&"'"
rs.open sql,conn,1,1
if not rs.eof then
if rs("pwd")=pwd then
session("cmdok")="ok"
response.redirect "add.asp"
rs.close
set rs=nothing
conn.close
set conn=nothing
else%>
<%reponse.write "<script>
alert ("密码错误!")
</script>"
end if
else%>
<%reponse.write "<script>
alert ("用户名错误!")
</script>"
session("cmdok")="fall"
end if
end if%>
...全文
38 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
avonqin 2003-10-15
  • 打赏
  • 举报
回复
如果你是用sql数据库
if rs("pwd")=pwd then
===》if trim(rs("pwd"))=pwd then
iamsangster 2003-10-15
  • 打赏
  • 举报
回复
script能执行吗?好像必须用函数吧 你能用asp的检测方法吗?
6025194 2003-10-15
  • 打赏
  • 举报
回复
11931143

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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