<!--#include file=conn.asp-->
<%
user_id=request("userid")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT  * From user1 where user_id='"&user_id &"'"
rs.open sql,conn,1,1
if not (rs.eof or rs.bof) then 
response.write "<script LANGUAGE='javascript'>alert('用户名已存在,请用其它用户名！');history.go(-1);</script>"
rs.close
set rs=nothing
response.End
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT  * From user1",conn,1,3
rs.addnew
rs("user_name")=replace(request("username"),"'","")
rs("user_id")=replace(request("userid"),"'","")
rs("user_password")=replace(request("pw1"),"'","")
rs("user_dh")=replace(request("HomePhone"),"'","")
rs("user_email")=replace(request("Usermail"),"'","")
rs.update
session("user_id")=user_id
session.Timeout=20
rs.close
set rs=nothing
conn.close
set conn=nothing
if session("user_id")<>"" then
response.write "<script language='javascript'>"
response.write "alert('注册成功！');"
response.write "location.href='index.asp';"			
response.write "</script>"
end if

%>
 
