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

📄 user_edit_save.asp

📁 一个较好的网上购物系统 是基于ASP的多用户网上商城
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
if request.form("temp")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('非法操作!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
else

if request.form("password1")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('密码不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if
if request.form("password2")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('确认密码不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if
if request.form("password2")<>request.form("password2") then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('2次密码不同,请重新输入!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if

if request.form("email")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('Email不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if

if request.form("shopname")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('店铺名称不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if
if request.form("shopcontent")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('店铺描述不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if
if request.form("shopaddress")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('店铺地址不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if
if request.form("shopphone")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('联系电话不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
end if

password1=request.form("password1")
email=request.form("email")
question=request.form("question")
answer=request.form("answer")
qq=request.form("qq")

shopname=request.form("shopname")
shopcontent=request.form("shopcontent")
shopaddress=request.form("shopaddress")
shopphone=request.form("shopphone")

set rs=server.createobject("adodb.recordset")
sql="select * from user_info where user_id="&session("user_id")&""
rs.open sql,conn,1,3
rs("user_password")=password1
rs("user_email")=email
rs("user_question")=question
rs("user_answer")=answer
rs("user_qq")=qq
rs("shop_name")=shopname
rs("shop_content")=shopcontent
rs("shop_address")=shopaddress
rs("shop_phone")=shopphone

session("user_password")=rs("user_password")
session("user_email")=rs("user_email")
session("user_question")=rs("user_question")
session("user_answer")=rs("user_answer")
session("user_qq")=rs("user_qq")
session("shop_name")=rs("shop_name")
session("shop_content")=rs("shop_content")
session("shop_address")=rs("shop_address")
session("shop_phone")=rs("shop_phone")

rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing

session("antry")="" '提交成功,清空session("antry"),以防重复提交!!
%>
<meta http-equiv="refresh" content="2;URL=user.asp">
<LINK href="style.css" type=text/css rel=stylesheet>
<table width="250" border="0" align="center">
  <tr> 
    <td align="center"><img src="images/success.gif" width="196" height="156"></td>
  </tr>
  <tr> 
    <td align="center">修改资料成功!2秒钟后自动返!</td>
  </tr>
</table>
<%end if%>

⌨️ 快捷键说明

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