一段简单的ASP 程序 帮我看一下哪里错了
<%
dim yzm
yzm=request.form"yzm"
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 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>location href='.asp'</script>"
end if
rs.close
conn.close
%>
答案:dim yzm
yzm=request.form"yzm"
set conn=Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0; data source="&server.MapPath("yh.mdb")
上一个:网站程序那个好啊 比如cms dede php asp 这都是程序吗
下一个:ASP是否已过时?而应以何种技术来进行动态网页程序设计较好?