关于ASP用户登录

来源:百度知道 编辑:UC知道 时间:2024/05/21 10:13:53
我的default.asp的代码如下:
<%
response.Expires=-9999
session.Abandon()
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>业务员下单系统</title>
</head>
<form action="login.asp" method="post" id="form1" name="form1">

<table border="0" width="29%" align=center>
<tr>
<td width="101%" colspan="2" bgcolor="#0080FF">
<p align="center"><font face="隶书" color=#ffffff>请您先登陆本系统</font></td>
</tr>
<tr>
<td width="50%">用户姓名:</td>
<td width="50%"><input type="text" name="name" size="20"></td>
</tr>
<t

你的程序在我的电脑上测试没有任何错误!!!!

我按照我的数据库更改的login.asp

<%@language="vbscript"%>
<%
name=request.Form("name")
password=request.Form("password")
sql="select * from admin where username='"& name &"'"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=e:\tqd\database\#tqddata.mdb"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn
response.Write sql
if rs.eof then
response.Write"错误的用户名和密码!"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.End
end if

if (rs("pass")<>password) then
response.Write"错误的用户名或密码"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.End
end if

session(&quo