| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 688 人关注过本帖
标题:asp+sql问题
只看楼主 加入收藏
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
收藏
得分:0 
兄弟们帮帮我
<%@language="vbscript" codepage="936"%>
<!--#include file="connnews/connnews.asp"-->
<%
admin_name=trim(request.form("admin_name"))
admin_password=trim(request.Form("admin_password"))
admin_yz=trim(request.Form("admin_yz"))
if admin_name="" and admin_password="" and admin_yz="" then
response.Write("<script language=javascript>alert('请填写完整!');")
response.Write("window.history.back();")
response.Write("</script>")
elseif Isnumeric(admin_yz)=true and int(session("getcode"))=int(admin_yz) then
set conn=server.CreateObject("adodb.connection")
conn.open news_data_string
set rs = server.CreateObject("adodb.recordset")
rs.activeconnection = news_data_string
rs.source="select admin_name from news_admin where admin_name='"&admin_name &"'"
rs.cursortype=0
rs.cursorlocation=2
rs.locktype=1
rs.open()
if not rs.bof and not rs.eof then
if rs("admin_password")=admin_password then
session("admin_name")=rs("admin_name")
response.Redirect("admin_index.asp")
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("密码不正确!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("非法用户!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("验证码错误!"))
rs.close
set rs=nothing
end if
%>
错误提示:(0x800A000D)
2006-03-29 16:34
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
收藏
得分:0 
<%
admin_name=trim(request.form("admin_name"))
admin_password=trim(request.Form("admin_password"))
admin_yz=trim(request.Form("admin_yz"))
if admin_name="" and admin_password="" and admin_yz="" then
response.Write("<script language=javascript>alert('请填写完整!');")
response.Write("window.history.back();")
response.Write("</script>")
elseif Isnumeric(admin_yz)=true and int(session("getcode"))=int(admin_yz) then
set conn=server.CreateObject("adodb.connection")
conn.open news_data_string
set rs = server.CreateObject("adodb.recordset")
rs.activeconnection = news_data_string
rs.source="select admin_name from news_admin where admin_name='"&admin_name &"'"
rs.cursortype=0
rs.cursorlocation=2
rs.locktype=1
rs.open()
if not rs.bof and not rs.eof then
if rs("admin_password")=admin_password then
session("admin_name")=rs("admin_name")
response.Redirect("admin_index.asp")
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("密码不正确!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("非法用户!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("验证码错误!"))
rs.close
set rs=nothing
end if
%>
2006-03-29 16:38
快速回复:asp+sql问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019687 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved