login.asp
资源名称:ASP.RAR [点击查看]
上传用户:xhjd888
上传日期:2022-07-20
资源大小:203k
文件大小:1k
源码类别:
.net编程
开发平台:
Visual Basic
- <%@ language="vbscript" %>
- <!--#include file="add/ocdb/ocdb.asp"-->
- <%
- name=Request("username")
- pass=Request("password")
- sql2="select * from userlist where username='" & name & "'"
- set rs2=server.CreateObject("adodb.recordset")
- rs2.open sql2,conn,1,3
- if rs2.eof then
- response.write"<script>alert('没有这个用户!');window.location='index.asp'</script>"
- %>
- <a href="index.asp">返回</a>
- <%response.end
- else
- if pass=rs2("password") then
- session("username")=name
- response.redirect "main.asp"
- Else
- response.write"<script>alert('密码错误!');window.location='index.asp'</script>"
- %>
- <a href="index.asp">返回</a>
- <%
- end if
- end if
- %>