错在哪里?
<!--#include file= "../include/conn.asp " -->
<%
user=request( "username ")
pwd=request( "pwd ")
if user= " " or pwd= " " then
response.write " <script> alert( '请填写完整! ');history.back(); </script> "
end if
sql= "select * from user where user= ' "&user& " ' "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
if not rs.eof then
if rs( "pwd ")=pwd then
response.write " <script> alert( '登录成功! ');window.location.href= 'bbs.asp '; </script> "
else
response.write " <script> alert( '密码错误! ');history.back(); </script> "
end if
else
response.write " <script> alert( '此用户不存在,请注册! ');window.location.href= 'reg.asp '; </script> "
end if
rs.close
set rs=nothing
conn,close
set conn=nothing
%>
[解决办法]
response.write " <script> alert( '请填写完整! ');history.back(); </script> "
要
Response.End
否则,下面的会继续执行
[解决办法]
conn,close
错在这里,倒数第三行,这里的 ", "号应该是 ". "号
给分