请教一个问题!

80酷酷网    80kuku.com

  问题(问题就是从第一个登陆界面无法成功登陆,显示页

面三!)



1.asp

<html>

<head>
<title>请您输入您的用户名及密码!</title>

</head>
<body bgcolor="#ffff00" text="#FFFFFF">
<form name=form method=post

action=2.htm>
<tr>
<td

background="../bj/74.gif" colspan="2"

height="25">
<div align="center"

class="13white">会员登录</div>
</td>
</tr>

<tr>
<td width="41%" height="30">

 会员ID号: </td>
<td width="59%" height="30">
<input type=text

name=username2 size=15>
</td>
</tr>
<tr>
<td width="41%">  密  码

:</td>
<td width="59%">
<input type=password

name=password2 size=15>
</td>
</tr>
<tr>
<td colspan="2" height="37">
<div align="center">
<input type=submit

name=Submit2 value=登录>
<input type=reset

name=reset2 value=重写>
</div>
</td>
</tr>
</body>

</html>



2.asp



<%language=vbscript%>
<%
Function checkpassword(name,password)
conn="driver={microsoft access driver

(*.mdb)};dbq="&server.mappath("moneyhy.mdb")
sql="select * from moneyhy where

idname='"&name&"' and pwd='"&password&"'"
Set rs=server.createobject

("adodb.recordset")
rs.open sql,conn
If rs.eof then
checkpassword=false
Else
checkpassword=true
End If
End Function
%>
<%

If isempty(session("passed")) then

session("passed")=false


session("vipusername")=request.form("username"

)


session("vippassword")=request.form("password"

)
Dim n,p
n=session("vipusername")
p=session("vippassword")
If n="" or p="" then
response.write "用户名或密码不能为空,请填完

整!<a href=history.back 1>返回</a>"
elseif not checkpassword(n,p) then
response.write "用户名或密码不正确,请重新输

入!<a href=history.back 1>返回</a>"
else
session("passed")=true
End If
if session("passed")=true then

response.redirect"3.htm"
End If
%>


3.asp

<html>

<head>
<title>登陆成功</title>

</head>
<body bgcolor="#ef1f00" text="#FFFFFF">

[1]    

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: