如何取消验证码限制??

来源:百度知道 编辑:UC知道 时间:2024/05/17 07:17:51
<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
dim sql,rs
dim username,password,CheckCode
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
CheckCode=replace(trim(Request("CheckCode")),"'","")
if UserName="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用户名不能为空!</li>"
end if
if Password="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>密码不能为空!</li>"
end if
if CheckCode="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>验证码不能为空!</li>"
end if
if session("CheckCode")="" then
FoundErr=True
ErrMsg=Err

看了上面的两条回答,同意二楼的,一楼的没有完全修改过来
正确的文件代码如下:

<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
dim sql,rs
dim username,password,CheckCode
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
if UserName="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用户名不能为空!</li>"
end if
if Password="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>密码不能为空!</li>"
end if
if FoundErr<>True then
password=md5(password)
set rs=server.createobject("adodb.recordset")
sql="select * from admin where password='"&password&"' and username='"&username&"'&qu