asp!到底是那里出错了,帮帮我啊?

来源:百度知道 编辑:UC知道 时间:2024/06/10 02:59:38
<!-- #include file="conn.asp" -->
<script language="javascript">
function check()
{
if (document.form1.f_name.value=="")
{alert("请输入用户名!");
document.form1.f_name.focus();
return false;
}
if (document.form1.f_pwd.value=="")
{alert("请输入密码!");
document.form1.f_pwd.focus();
return false;
}
if (document.form1.f_pwd.value!=document.form1.f_rpwd.value)
{alert("确认密码不正确,请重新输入密码!");
document.form1.f_rpwd.value==""
document.form1.f_pwd.focus();
}
document.form1.ctype.value=="add"
document.form1.submit();
}
</script>
<%
set rst=Server.CreateObject("ADODB.recordset")
if trim(request("ctype"))="add" then
sql="select*from user where u_name='" &trim(request(&quo

这么简单的问题 你不会自己看吗

document.form1.f_rpwd.value==""
你看看你的这句话能对吗
两个等号 成判断了 是赋值吗????

我在帮你看,错的地方真不少

我测试通过了。 加分加分
conn.asp
<%
set conn=server.createobject("adodb.Connection")
conn.open "DRIVER=Driver do Microsoft Access (*.mdb);DBQ="&Server.MapPath("data/db.mdb")
'conn.open="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("data/db.mdb")

Function connClose
conn.close
Set conn = Nothing
End Function
%>

register.asp
<!-- #include file="conn.asp" -->
<%
set rst = Server.CreateObject("ADODB.recordset")

if trim(request("ctype"))="add" then
sql="select * from user where u_name='" &trim(request("f_name"))&"'"
rst.open sql,conn,1,1
if not rst.eof then
%>