?? reg_save.asp
字號:
<!--#include file="Comm/conn.asp"-->
<%
UserId=replace(request.form("UserId")," ","")
UserPassword=replace(request.form("pw1")," ","")
UserMail=request.form("UserMail")
Username=request.form("Username")
UserQQ=request.form("UserQQ")
Sex=request.form("Sex")
Maritalstatus=request.form("Maritalstatus")
Birthday=request.form("Birthday")
IncomeRange=request.form("IncomeRange")
Occupation=request.form("Occupation")
CompanyName=request.form("CompanyName")
CompPhone=request.form("CompPhone")
HomePhone=request.form("HomePhone")
Country=request.form("Country")
Province=request.form("Province")
City=request.form("City")
Address=request.form("Address")
ZipCode=request.form("ZipCode")
Memo=request.form("Memo")
WantMessage=request.form("WantMessage")
%>
<HTML>
<HEAD>
<TITLE>注冊-保存基本資料-<%=sitename%>-<%=siteurl%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
<link rel="stylesheet" href="shop.css" type="text/css">
<meta http-equiv=refresh content="2;URL=my_accounts.asp">
</HEAD>
<BODY>
<!--#include file="menu/topbar.asp"-->
<%
'開始檢測是否已有此用戶
set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM UserMain where UserId= '" & UserId & "'"
rs.open sql,conn,1,1
if not (rs.Bof or rs.eof) then
rs.Close
set rs=nothing
call id_no()
else
call reg_ok()
end if
sub id_no()
response.write "<TABLE width=760 border=0 cellpadding=1 cellspacing=1 align=center><TR>"&_
"<Td width=20% valign='top' align=center><br><font color=red><b>對不起!</b>"&_
"<br><br>該賬號已經有人使用,<br>請另外選擇用戶號!</font><BR><BR>"
response.write "<a href='javascript:history.go(-1)'><b>返回上一頁</b></a><BR><BR></td></tr></table>"
end sub
sub reg_ok()
sqlinfo = "select * from UserMain"
set rsadd=Server.Createobject("ADODB.RecordSet")
application.lock
rsadd.Open sqlinfo,conn,3,3
rsadd.AddNew
rsadd("UserId")=UserId
rsadd("UserPassword")=UserPassword
rsadd("Username")=Username
if UserQQ<>"" then rsadd("UserQQ")=UserQQ
if Sex<>"" then rsadd("Sex")=Sex
if Maritalstatus<>"" then rsadd("Maritalstatus")=Maritalstatus
if Birthday<>"" then rsadd("Birthday")=Birthday
if IncomeRange<>"" then rsadd("IncomeRange")=IncomeRange
if Occupation<>"" then rsadd("Occupation")=Occupation
if CompanyName<>"" then rsadd("CompanyName")=CompanyName
if HomePhone<>"" then rsadd("HomePhone")=HomePhone
if CompPhone<>"" then rsadd("CompPhone")=CompPhone
if UserMail<>"" then rsadd("UserMail")=UserMail
if Country<>"" then rsadd("Country")=Country
if Province<>"" then rsadd("Province")=Province
if City<>"" then rsadd("City")=City
if Address<>"" then rsadd("Address")=Address
if ZipCode<>"" then rsadd("ZipCode")=ZipCode
if Memo<>"" then rsadd("Memo")=Memo
if WantMessage<>"" then rsadd("WantMessage")=WantMessage
rsadd.Update
application.unlock
set rsadd = nothing
%>
<TABLE width=760 border=0 cellpadding=10 cellspacing=1 align=center>
<TR><Td width=20% valign="middle" align=center height=300>注冊成功,如果需要修改,請到<a href="my_accounts.asp">用戶中心</a>修改您的個人資料<BR><BR>
<BR><BR></td></tr>
</table>
<%
end sub
%>
<!--#include file="menu/bottom.asp"-->
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -