check.asp
上传用户:shxinnian
上传日期:2013-01-14
资源大小:155k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Windows_Unix

  1. <% @language="vbscript" %>
  2. <%Response.buffer="True"%>
  3. <!--#include file="conn.asp"-->
  4. <%
  5. dim rs,sql
  6. dim uID,pwd
  7. uID=request.form("uID")
  8. pwd=request.form("pwd")
  9. set rs=Server.CreateObject("Adodb.Recordset")
  10. sql="select uID,pwd,rname from member where uID='"&uID&"'"
  11. rs.open sql,conn,1,1
  12. If rs.eof Then
  13. response.write "<script>alert('无此会员名,请返回首页登记新会员!');history.back();</Script>"
  14. response.end
  15. End If
  16. dim dbpwd,rname
  17. dbpwd=rs("pwd")
  18. rname=rs("rname")
  19. conn.close
  20. set conn=nothing
  21. rs.close
  22. set rs=nothing
  23. If dbpwd<>pwd Then
  24. response.write "<script>alert('密码错误,请返回从新填写!');history.back();</Script>"
  25. response.end
  26. Else
  27.  Response.cookies("member")=true
  28.  Response.cookies("uID")=uID
  29.  Response.cookies("rname")=rname
  30.  Response.redirect"user_ctrl_panel.asp"
  31. End If
  32. %>
  33. <html>
  34. <head>
  35. <title></title>
  36. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  37. </head>
  38. <body>
  39. </body>
  40. </html>