admin_user_add_save.asp
来自「培训学员管理系统」· ASP 代码 · 共 46 行
ASP
46 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn_fj16.asp" -->
<!--#include file="admin_qx.asp" -->
<% isgjgl %>
<%
yonghuming=trim(request("yonghuming"))
pwd=trim(request("pwd"))
pwd2=trim(request("pwd2"))
xingming=trim(request("xingming"))
jibie=trim(request("jibie"))
beizhu=trim(request("beizhu"))
if yonghuming="" then
response.Write "<script language=javascript>{window.alert('报错:用户名不能为空!');window.history.go(-1);}</script>"
response.end
end if
if xingming="" then
response.Write "<script language=javascript>{window.alert('报错:真实姓名不能为空!');window.history.go(-1);}</script>"
response.end
end if
if pwd="" and pwd2 =""then
response.Write "<script language=javascript>{window.alert('报错:密码不能为空!');window.history.go(-1);}</script>"
response.end
end if
if pwd<>pwd2 then
response.Write "<script language=javascript>{window.alert('报错:两次输入的密码不相同!');window.history.go(-1);}</script>"
response.end
end if
sql="select * from admin156"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,2
rs.addnew
rs("yonghuming")=yonghuming
rs("pwd")=pwd
rs("xingming")=xingming
rs("jibie")=jibie
rs("beizhu")=beizhu
rs.update
response.Write "<script language=javascript>{window.alert('添加成功!请点击“确定”返回 ');window.location.href='admin_user.asp';}</script>"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?