一个菜问题??!

raymond323 2003-11-25 11:06:08
<%@ Language=VBScript %>
<%
username=Request.Form("username")
password=Request.Form("password")
username=replace(username,"'","")
password=replace(password,"'","")
response.write password
sql="select * from UserTable where username='"&username&"'"

set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql, Application("dsn"),3,1
response.write rs("password")
response.write password1
if rs.EOF then
response.write "错误的用户名或密码1!"
rs.Close()
set rs=nothing
response.End
end if
if not(rs("password")=password) then
response.write"error!"
rs.Close()
set rs=nothing
response.End
end if
session("username")=rs("username")
session("role")=rs("role")
rs.Close()
response.Redirect "jxc.asp"
%>
这段语句错在那里就是不能正常运行 ,总是进入if not(rs("password")=password)的条件句。
...全文
31 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
raymond323 2003-11-26
  • 打赏
  • 举报
回复
谢谢 我解决了
bubuy 2003-11-25
  • 打赏
  • 举报
回复
if not(trim(rs("password"))=trim(password)) then '试试
pimple 2003-11-25
  • 打赏
  • 举报
回复

if rs("password")<>password then

28,407

社区成员

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

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