一个关于密码找回的技术问题
大家帮忙看看这代码对吗?我运行的时候总说 user 附近有语法问题
<%end if
case "step1 "
if request( "username ")= " " then
Errmsg=Errmsg+ " <br> "+ " <li> 请输入您的用户名。 "
call error()
response.end
else
username=replace(request( "username "), " ' ", " ")
end if
set rs=conn.execute( "Select question,Answer,Username from user where username= ' "&username& " ' ")
if rs.eof and rs.bof then
Founderr=true
errmsg=Errmsg+ " <br> "+ " <li> 您输入的用户名并不存在,请重新输入。 "
call error()
response.end
else
if rs(0)= " " or isnull(rs(0)) then
Errmsg=Errmsg+ " <br> "+ " <li> 该用户没有填写密码问题及答案,只有填写的用户方能继续。 "
call error()
response.end
else%>
------解决方案--------------------set rs=conn.execute( "Select question,Answer,Username from user where username= ' "&username& " ' ") -->
set rs=conn.execute( "Select Top 1 [question],[Answer],[Username] From [user] where [username]= ' "&username& " ' ")