问题详情

【问题 3】(6 分)

用户登录部分功能调用由位于发布目录 c:\website 下的login.asp 文件实现,数据库连接由 conn.asp 文件实现。其中,数据库文件名为 account.mdb,用户表为 actuser,用户名字段和用户密码字段分别为 act_username 和 act_password。 login.asp 代码如下所示,请将空缺的部分补充完整,并填写在答题纸的相应位置。

<!--#include file="conn.asp"-->

<%

sql="select * from actuser where act_username='"&username&"'"

rs.open sql,conn,1,1

if (11) then

response.write "<script>alert('登录失败');history.back();</script$amp;>quot;$

response.end

else

if rs("act_password")$amp; response.write "<script>alert('登录失败');history.back();</script$amp;>quot;$

(12)

end if

session("admin")=username

response.write"<script>alert('登录成功');location.href='index.asp'</script$amp;>quot;$

(13)

%>

参考答案
您可能感兴趣的试题