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

📄 modifyuserdb.asp

📁 自己设计的人事工资管理系统。欢迎大家相互学习。
💻 ASP
字号:
<!--#INCLUDE FILE="conn.asp" -->
<html>
<head>
<LINK href="../style.css" rel=stylesheet>
<title>添加用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body,td,th {
	font-size: 9pt;
}
body {
	background-image: url(image/bg.gif);
}
-->
</style></head>
<body bgcolor="#66CCFF">
<table width="40%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td> 
      <%'------------接收数据-------------
   Kusername=trim(Request("username"))     '用户名
   oldpassword=trim(request("oldpassword"))'旧密码
   password1=trim(request("password1"))    '密码
   password2=trim(request("password2"))    '确认密码
   age=trim(request("age"))  
   sex=trim(request("sex"))                '性别
   Email=trim(request("Email"))            '电子邮件
   phone=trim(request("phone"))            '联系电话
   place=trim(request("place"))            '住址
   
   if sex="" then
      sex="未知"
   end if
   if age="" then
      age="未知"
   end if
   if Email="" then
      Email="未知"
   end if   
   if phone="" then
      phone="未知"
   end if
   if place="" then
      place="未知"
   end if
  
 sqlstr="select * from 用户表 where 用户名='"&Kusername&"'"
 my_rs.open sqlstr,my_Conn,1,1
  
   if  my_rs("密码") <> oldpassword then   
         Response.Write "旧密码错 请确认!" & "<input type='button' value='返回' name='B2'  onclick='javascript:history.back()'>"
   else
         if password1=password2 then
                my_rs.close 
                StrSQL = "Select * from 用户表 where 用户名='"&Kusername&"'" 
	            my_rs.Open StrSQL,my_Conn,1,3
	            
	            my_rs("密码") = password1
             	my_rs("性别") = sex
				my_rs("年龄") = age
             	my_rs("电子邮件") = Email
            	my_rs("联系电话") = phone
             	my_rs("住址") = place
            	my_rs.Update   
                Response.Write "用户添加成功!" & "<input type='button' value='返回' name='B2' class='buttonface' onclick='javascript:history.back()'>"
   else
                Response.Write "密码不一致 请确认!" & "<input type='button' value='返回' name='B2' class='buttonface' onclick='javascript:history.back()'>"
         end if
   end if
   response.write "&nbsp;"
   response.write "<input type='button' value='关闭窗口' name='B2' onclick='javascript:self.close()'>"

%>
  </tr>
</table>
</body>

</html>

⌨️ 快捷键说明

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