大家看看我的ASP代码那里错了

来源:百度知道 编辑:UC知道 时间:2024/06/01 02:59:57
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户验证中……</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #666666;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style></head>

<body>
<%
dim flag
dim name
dim psw
name=trim(request.Form("name"))
psw=trim(request.Form("psw"))
'验证是否经过表单提交
if isnull(name) then
Response.Write"非法操作"
Response.end
end if
set conn=Server.CreateObject("ADODB.connection")
conn.open "driver={Mi

if name=rs.("name") and psw=rs.("psw") then

if name=rs("name") and psw=rs("psw") then
把所有的rs.("??")
rs后面的点不要看看

写的好杂乱啊。

提示哪里出错。

老兄,这是语法错误欧,取数据库字段应该是
rs("name") rs("psw") 你的写法多了一个点欧

if name=rs.field("name") and psw=rs.field("psw") then

Response.Write("非法操作")
conn=new OLEDBconnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath(""))