📄 userchange.asp
字号:
<%@ Language=VBScript %>
<%option explicit
dim name,tel,addr,email,zip,pw1,pw2,temp
dim founderr,errmsg
founderr=false
temp=Request.Form("nicename")
name=Request.Form("name")
if name="" then
founderr=true
errmsg="姓名不能为空"
end if
tel=Request.Form("tel")
if tel="" then
founderr=true
errmsg=errmsg & "联系电话不能为空"
end if
addr=Request.Form("addr")
if addr="" then
founderr=true
errmsg=errmsg & "联系地址不能为空"
end if
email=Request.Form("email")
if email="" then
founderr=true
errmsg=errmsg & "e-mail不能为空!"
end if
zip=Request.Form("zip")
if zip="" then
founderr=true
errmsg=errmsg & "邮编不能为空!"
end if
pw1=Request.Form("password")
'if (pw1="" or pw1<>pw2) then
' founderr=true
' errmsg=errmsg & "密码错误!"
'end if
if founderr then
Response.Write errmsg
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form method="POST" action="userchange.asp">
<table border="1" width="53%" align="center">
<tr>
<td width="100%" colspan="2" class="FONT"><font face="宋体">您的资料:</font></td>
</tr>
<tr>
<td width="24%" class="FONT">昵称:</td>
<td width="76%" class="FONT"><%=rs("nicename")%> <input type="hidden" name="T7" size="20" value="<%=rs(nicename)%>"></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">姓名:</font></td>
<td width="76%" class="FONT"><input type="text" name="T1" size="20" value="<%=rs("name")%>"></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">联系电话:</font></td>
<td width="76%" class="FONT"><font face="宋体"><input type="text" name="T2" size="20" value="<%=rs("tel")%>"></font></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">联系地址:</font></td>
<td width="76%" class="FONT"><font face="宋体"><input type="text" name="T3" size="20" value="<%=rs("addr")%>"></font></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">邮编:</font></td>
<td width="76%" class="FONT"><font face="宋体"><input type="text" name="T4" size="20" value="<%=rs("zip")%>"></font></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">E_mail:</font></td>
<td width="76%" class="FONT"><font face="宋体"><input type="text" name="T5" size="20" value="<%=rs("email")%>"></font></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">password:</font></td>
<td width="76%" class="FONT"><input type="text" name="T6" size="20" value="<%=rs("password")%>"></td>
</tr>
<tr>
<td width="100%" colspan="2">
<p class="FONT"><font face="宋体">
</font><input type="submit" value="修改" name="B1"></p>
</td>
</tr>
</table>
</form>
</BODY>
</HTML>
<%else
dim connstr,conn,rs,sql
connstr="dbq="+server.MapPath("mdb/bookshop.mdb")+";defaultdir=;driver={microsoft access driver (*.mdb)};"
set conn=server.CreateObject("adodb.connection")
conn.Open connstr
set rs=server.CreateObject("adodb.recordset")
sql="select * from guest where nicename='" & temp &"'"
rs.open sql,conn,3,2
if rs.EOF=true then
rs.MoveLast
end if
'rs.AddNew
rs("nicename")=temp
rs("name")=name
rs("tel")=tel
rs("addr")=addr
rs("zip")=zip
rs("email")=email
rs("password")=pw1
rs.Update
rs.Close
conn.Close
set conn=nothing
set rs=nothing
%>
<table border="1" width="53%" align="center">
<tr>
<td width="100%" colspan="2" class="FONT"><font face="宋体">您的资料:</font></td>
</tr>
<tr>
<td width="24%" class="FONT">昵称:</td>
<td width="76%" class="FONT"><%=temp%> </td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">姓名:</font></td>
<td width="76%" class="FONT"><%=name%></td>
</tr>
<tr>
<td width="24%" class="FONT">联系电话:</td>
<td width="76%" class="FONT"><%=tel%></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">联系地址:</font></td>
<td width="76%" class="FONT"><%=addr%></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">邮编:</font></td>
<td width="76%" class="FONT"><%=zip%></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">E_mail:</font></td>
<td width="76%" class="FONT"><%=email%></td>
</tr>
<tr>
<td width="24%" class="FONT"><font face="宋体">password:</font></td>
<td width="76%" class="FONT"><%=pw1%></td>
</tr>
<tr>
<td width="100%" colspan="2">
</td>
</tr>
</table>
<% end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -