?? usersave.asp
字號:
<!--#include file="conn.asp"-->
<%
if request.form("truename")="" then
response.write"<script language=javascript>alert('真實姓名請您填寫');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("phone")="" then
response.write"<script language=javascript>alert('電話號碼請您填寫');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("email")="" then
response.write"<script language=javascript>alert('E-mail請您填寫');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("post")="" then
response.write"<script language=javascript>alert('郵編請您填寫');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
if request.form("address")="" then
response.write"<script language=javascript>alert('地址請您填寫');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
username=trim(request.form("user"))
set rs=server.createobject("adodb.recordset")
sql="select * from member where cname='"&username&"'"
rs.open sql,conn,3,3
if rs.eof then
response.write"<script language=javascript>alert('此用戶已經被刪除');this.location.href='javascript:history.go(-1)';</script>"
else
rs("cname")=trim(request("user"))
rs("truename")=trim(request("truename"))
rs("phone")=trim(request("phone"))
rs("email")=trim(request("email"))
rs("post")=trim(request("post"))
rs("address")=trim(request("address"))
rs("regtime")=now()
rs("ip")=request.servervariables("remote_addr")
rs.update
response.write"<script language=javascript>alert('用戶信息修改成功');this.location.href='javascript:history.go(-1)';</script>"
end if
rs.close
set rs=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -