asp,我到底错在哪里?请大家帮我看看好吗
我是一个ASP的菜鸟,在最近的学习中要编写一个关于修改密码的小程序,可是总是500服务器出错,自己又看不出来,请求哪位大虾帮我看一下(我就连哪错了都不知道)
<% @LANGUAGE="VBSCRIPT"%>
<%Action=trim(request("Action"))
if Action="Modify" then
call ModifyPwd()
else
call main()
end if
%>
<%sub main()%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body><script language=javascript>
function CheckForm()
{ if(document.change.T1.value=="")
{
alert("密码不能为空!");
document.change.T1.focus();
return false;
}
if(document.change.T1.value!=document.change.T2.value)
{
alert("两次密码输入不一致!");
document.change.T1.focus();
return false;
}
}
</script>
<form method="POST" action="changemima.asp" name="change" onsubmit="return CheckForm()">
<p>用户名<input type="text" name="T3" size="20">请输入你的新密码<input type="password" name="T1" size="20"></p>
<p>请再次确认你的密码<input type="password" name="T2" size="20"></p>
<p><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"><input name="Action" type="hidden" id="Action" value="Modify">
</p>
</form>
</body>
</html>
<%end sub%>
<%sub ModifyPwd()
DIM newpw,userid
newpw=trim(request.form("T1"))
userid=trim(request.form("T3"))
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open "manager" ----------数据源名
sqlstr="update manager set password='"&newpw&"' where id='"&userid&"'"
set Rs=Conn.execute(sql)
if not Rs.eof and Rs.bof then
response.write "修改成功"
end if
Rs.close
set Rs=nothing
conn.close
set conn=nothing
end sub %>
多谢