[求助]确认用户名是否被使用
我是刚学,改了很久都改不出来,帮改一下!!万分感谢!
<html>
<head>
<title>无标题文档</title>
</head>
<body>
<form name="form1">
<p>
<input name="xx" type="text" id="xx">
<%
sqlstr="SELECT * from zhuce where use='"&request.form("xx")&"' "
set myrs=server.CreateObject("Adodb.recordset")
myrs.Open sqlstr,cc,1,3
if myrs.eof then
myrs.addnew
myrs("use")=request.form("xx")
myrs("pw")=request.form("pw")
myrs.update
else
response.write("<script>alert('帐号重复!');window.close()</script>")
end if
%>
</p>
<p>
<input name="pw" type="text" id="pw">
</p>
<p>
<input type="submit" name="Submit" value="提交">
</p>
</form>
<p> </p>
</body>
</html>