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

📄 usersave.asp

📁 本同学录系统演示地址: http://class.19870123.cn/ 下载后请在Web.Config里更改设置,如数据库路径等 如果要换sql数据库,请将app_code里的MyPage
💻 ASP
字号:
<!-- #include file="../ConnDB.asp" -->
<!--#include file="../class/person.asp"-->

<html>
<head>
<title>保存用户信息</title>
</head>
<body>
<%
	set objPerson = new Person	'创建Person对象,用于访问个人信息表
    Dim sql,uid
	
	uid = Request("userid")					' 用户名
	objPerson.UserId = uid						' 用户名
	objPerson.UserPwd = Request("pwd")			' 密码
	objPerson.Name = Request("username")		' 姓名
	objPerson.Sex = CInt(Request("sex"))		' 性别
	objPerson.Address = Request("address")		' 地址
	objPerson.Postcode = Request("telephone")	' 邮编
	objPerson.Email = Request("email")			' 电子邮件
	objPerson.Telephone	= Request("telephone")	' 电话
	objPerson.Mobile = Request("mobile")		' 手机
	objPerson.Company = Request("company")		' 单位
	objPerson.Birthday = Request("birthday")	' 生日

	If Request.Form("isadd")="new" Then
	  '判断此用户是否存在
	  if objPerson.HavePerson(uid) then
%>
			<script language="javascript">
				alert("已经存在此用户名!");
				history.go(-1);
			</script>
<%
	  else
		objPerson.Status = 0						' 当前状态
		objPerson.UserType = 0						' 用户类型
		objPerson.insert()
	  end if
	else
		'更新用户信息
	  objPerson.update(objPerson.UserId)
	end if

	Response.Write "<h2>用户信息已成功保存!</h2>"
%>
</body>
<script language="javascript">
	opener.location.reload();
	setTimeout("window.close()",800);
</script>
</html>

⌨️ 快捷键说明

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