⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 savereg.asp

📁 医院专家挂号系统设计
💻 ASP
字号:
<!--#include file="inc/adovbs.asp"-->
<!--#include file="inc/Conn.asp"-->
<!--#include file="inc/MD5.asp"-->
<!--#include file="inc/SQLCHK.asp"-->
<%
Dim UserNameR, PasswordR, QuestionR, AnswerR, RealNameR, SexR, BirthdayR
Dim IDCardR, EmailR, LinkMethodR, AddressR, MedHistoryR, MedRecordR, OtherInfoR
UserNameR = Request.Form("UserName")
PasswordR = MD5(Request.Form("Password"))
QuestionR = Request.Form("Question")
AnswerR = Request.Form("Answer")
RealNameR = Request.Form("RealName")
SexR = Request.Form("Sex")
BirthdayR = Request.Form("Birthday")
IDCardR = Request.Form("IDCard")
EmailR = Request.Form("Email")
LinkMethodR = Request.Form("LinkMethod")
AddressR = Request.Form("Address")
MedHistoryR = Request.Form("MedHistory")
MedRecordR = Request.Form("MedRecord")
OtherInfoR = Request.Form("OtherInfo")

MessageBox(Request.Form("Password"))

Dim RS
Set RS=Server.CreateObject("ADODB.RecordSet")
RS.ActiveConnection=Conn
RS.Source = "Select * From [USER] Where UserName='"&UserNameR&"'"
RS.CursorType = adOpenKeyset
RS.CursorLocation = adUseServer
RS.LockType = adLockReadOnly
RS.Open
'查询用户是否已经存在
If Not(RS.Eof Or RS.Bof) Then
  Response.write "<script language='javascript'>" &Chr(13)
  Response.write "alert('用户名已存在!');" &Chr(13)
  Response.write "javascript:history.go(-1);"&Chr(13)
  Response.write "</script>" &Chr(13)
  Response.End 
Else
  RS.Close
  '用户不存在,进行存储过程
  RS.Source = "Select * From [USER] Where (ID IS Null)"
  RS.LockType = adLockOptimistic
  RS.Open
  '添加数据集
  RS.AddNew
  RS("Username") = UserNameR
  RS("Password") = PasswordR
  RS("Question") = QuestionR
  RS("Answer") = AnswerR
  RS("RealName") = RealNameR
  RS("Sex") = SexR
  RS("Birthday") = BirthdayR
  RS("IDCard") = IDCardR
  RS("Email") = EmailR
  RS("LinkMethod") = LinkMethodR
  RS("Address") = AddressR
  RS("MedHistory") = MedHistoryR
  RS("MedRecord") = MedRecordR
  RS("OtherInfo") = OtherInfoR
  RS.Update
End If

'扫尾工作
RS.close
Set RS = nothing
ConnClose()
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('注册成功!请返回登陆...');" &Chr(13)
Response.write "window.document.location.href='Login.asp';"&Chr(13)
Response.write "</script>" &Chr(13)
Response.End 
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -