在主页中利用ASP技术实现用户口令的验证
homepage1.htm 文件如下:
< !--#INCLUDE FILE="includecheck.htm"-- >
< html >
< head >
< title > 欢迎进入本系统< /title >
< /head >
< body >
< p align="center" > 欢迎通过认证进入本系统!< /p >
< /body >
< /html >
includecheck.htm 文件如下:
< %@ LANGUAGE="VBSCRIPT" % >
< %
' 判断有没有先访问homepage.htm后按确定按钮
if isempty(session("username")) or isempty(session("password")) then
response.redirect "homepage.htm"
end if
' 判断有没有顺利经过用户名与口令的验证
if session("username")="" then
response.redirect "homepage.htm"
end if
% >
|