当前位置:编程学习 > asp >>

一段asp程序 实现密码和验证码的验证登陆 高手来帮我看一下是否有错误

<% dim zym yzm=request.form"zym" set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open Server.MapPath("yh.mdb") set rs = Server.CreateObject("ADODB.recordset") username=request.form("username") password=request.form("password") sql = "select * from 用户 where 用户名='" & username & "' and 密码='" & password & "'" rs.Open sql, conn if rs.eof or then response.write "用户名或密码不正确" else if cint(yzm)<>session("checkcode") then response.write"<script>alert('验证码错误');history.back();</script>" end if response.cookies("username") = username response.write"<script>alert('登陆成功');history.go("dlsy.asp");</script>" end if rs.close conn.close %>
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,