saveuser1.asp
来自「asp+access的电影免费网站源码是个很好的学习例子大家可以下来学习」· ASP 代码 · 共 46 行
ASP
46 行
<%@ LANGUAGE = "vbscript" %>
<!--#include file ="../md5/md5.asp"-->
<!--#include file="security.asp"-->
<!--#include file="articleconn.asp"-->
<%if session("flag")>1 then
response.write "<br><p align=center>您的操作权限不够!</p>"
response.end
end if
%>
<%
username=LCase(Request("username"))
password=LCase(Request("newpin"))
re_newpin=LCase(Request("re_newpin"))
if password<>re_newpin then
response.write"<script>alert('初始密码与确认密码不一致,不接受!');history.back();</Script>"
response.end
end if
password=MD5(password)
flag=Request("flag")
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from password where name='"&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 password"
rs.open sql,conn,1,3
rs.addnew
rs("name")=username
rs("pwd")=password
rs("flag")=flag
rs.update
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
Response.Redirect "adminuser.asp"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?