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

📄 saveuser1.asp

📁 中介之家房产中介系统 V4.0企业共享版
💻 ASP
字号:
<!--#include file=../conn/conn1.asp --><!--#include file="char.inc"-->
<% if request.cookies("okadmin")="" and request.cookies("rank")="" then
  response.redirect "login.asp"
end if 

dim username, password, right_class
dim rs, sql

   username=LCase(Request("username"))
   password=LCase(Request("newpin"))
   right_class=CInt(Request("right_class"))

   Set rs=Server.CreateObject("Adodb.RecordSet")
   
   rs.Open "Select * from Admin where username='"&username&"'",conn

   if not rs.EOF then

   Response.Write "<font color=red><div align=center><br><br>该用户名已经存在</div></font>"
   Response.End   

   end if
   rs.close
   sql="select * from admin"
   rs.open sql,conn,1,3
   rs.addnew
   rs("username")=username
   rs("password")=password
   rs("rank")=right_class
   rs.update
   rs.Close
   set rs=Nothing
   
   conn.Close
   set conn=Nothing

   Response.Redirect "admin_admin.asp"
%>

⌨️ 快捷键说明

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