大家好,小弟正在学习网站的制作,在做注册页面的时候出现了点问题,就是同一个帐号可以一直注册,想问下大家怎么解决,大家帮帮我,谢谢了
<!--#include file="conn.asp"-->
<%
dim rs,rs1,strsql,sql1,Form_username,Form_password1,Form_password2,nicheng,Form_mail,Form_Question,Form_Answer,Form_homepage,Form_icq,Form_oicq,Form_msn,Form_address,Form_sex,Form_byear,Form_bmonth,Form_bday,Form_Underwrite
Form_username=cstr(server.htmlencode(request("Form_username")))
Form_password1=cstr(server.htmlencode(request("Form_password1")))
Form_password2=cstr(server.htmlencode(request("Form_password2")))
nicheng=cstr(server.htmlencode(request("nicheng")))
Form_mail=cstr(server.htmlencode(request("Form_mail")))
Form_Question=cstr(server.htmlencode(request("Form_Question")))
Form_Answer=cstr(server.htmlencode(request("Form_Answer")))
Form_homepage=cstr(server.htmlencode(request("Form_homepage")))
Form_icq=cstr(server.htmlencode(request("Form_icq")))
Form_oicq=cstr(server.htmlencode(request("Form_oicq")))
Form_msn=cstr(server.htmlencode(request("Form_msn")))
Form_address=cstr(server.htmlencode(request("Form_address")))
Form_sex=cstr(server.htmlencode(request("Form_sex")))
Form_byear=cstr(server.htmlencode(request("Form_byear")))
Form_bmonth=cstr(server.htmlencode(request("Form_bmonth")))
Form_bday=cstr(server.htmlencode(request("Form_bday")))
Form_Underwrite=cstr(server.htmlencode(request("Form_Underwrite")))
set rs1=server.createobject("adodb.recordset")
sql1="select Form_username from it where Form_username='"&Form_usernamee&"'"
rs1.open sql1,conn,1,1
if rs1.eof then
strsql="insert into it values('"&Form_username&"','"&Form_password1&"','"&Form_password2&"','"&nicheng&"','"&Form_mail&"','"&Form_Question&"','"&Form_Answer&"','"&Form_homepage&"','"&Form_icq&"','"&Form_msn&"','"&Form_address&"','"&Form_sex&"','"&Form_byear&"','"&Form_bmonth&"','"&Form_bday&"','"&Form_Underwrite&"')"
set rs1=conn.execute(strsql)
%>
<script language=javascript>
alert("注册成功!")
</script>
<%
else
response.write "此用户名已经存在!<a href=zhuce.asp>返回</a><br>"
end if
%>