+ -
当前位置:首页 → 问答吧 → 求助!求助!不知道哪错了!!

求助!求助!不知道哪错了!!

时间:2011-10-15

来源:互联网

<!--#include file="config.inc"-->
<html>
<head>
<title>会员登录</title>
<style>
<!--td{font:10pt;}-->
</style>
</head>
<body style="font:10pt">
<% dim flag
  logname=trim(request.form("logname"))
  pasword=trim(request.Form("pasword"))
  if logname=""then
  response.Write"<center><h1>操作错误请重试!</center></h1>"
  response.End
  else
  dim cn,points,login
if logname="" or pasword=""then
response.Write"<p align=center>出错提示:会员名、密码不能为空!</p>"
response.Write"<p align=center><a href=oldlogin.asp>点击这里重新登陆!</a></p>"
response.End
end if
 
set cn=Server.CreateObject("ADODB.Recordset")
cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring
 
if cn.eof then
response.Write"<p align=center>出错提示:会员名不存在,活会员名、密码不正确!</p>"
response.Write"<p align=center><a href=oldlogin.asp>1、重新进入登陆页面!</a></p>"
response.Write"<p align=center><a href=enroll.asp>2、注册新用户!</a></p>"
response.End
else
response.Write"<font style=font:10pt>登陆成功!<a href=temp.htm style=color:blue>继续购物</a></font><br>"
session("login")=session.SessionID
session("loginuser")=cn("userid") 
end if
 
points=cn("points")
if points<>0 then
response.Write"<br><font style=font:10pt>恭喜您的积分已经达到<font color=red>" & points & "</font>"
end if
 
cn.close
set cn=nothing
end if
%>
</body>
</html>



*********************************************
错误

Microsoft OLE DB Provider for ODBC Drivers '80040e4e'

操作已被取消。

\www\findhistory.asp, line 25
**********************************


麻烦给看看哪错了啊???

作者: tcnxm23   发布时间: 2011-10-15

VB code

cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring,1,1


作者: gukie   发布时间: 2011-10-15