主题:  晕..都不回答我,是怕有病毒吧..那我写下来你们看看.

jackbeenwz

职务:普通成员
等级:1
金币:0.0
发贴:11
#12006/3/17 11:00:00
这是用户信息修改页面
<%
rs.Open "Select * From member Where UserName = '" & UserName & "'",Conn
Email = rs ("Email"
QQMSN = rs ("QQMSN"
FirstName = rs ("FirstName"
LastName = rs ("LastName"
Address = rs ("Address"
City = rs ("City"
State = rs ("State"
ZipCode = rs ("ZipCode"
Country = rs ("Country"
Referral = rs ("Referral"
PaymentMethod = rs ("PaymentMethod"
PaymentAccount = rs ("PaymentAccount"
Vacation = rs ("Vacation"
rs.Close
%>

<div align="center">
<center>

<table border="0" cellspacing="1" cellpadding="0" style="border-collapse: collapse" width="760" id="table1">
<tr>
<td align="center" valign="top" width="120" id="table3">
<div align="center">
<!--#include file="leftads.asp"-->
</div>
</td>
<td align="center" valign="top">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table1">
<tr id="table2">
<td align="center" width="100%" height="30">个人信息</td>
</tr>
<tr>
<td align="center" width="100%">
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" width="100%" id="table4">

<!--#include file="usernavi.asp"-->

<tr>
<td align="center" width="100%" height="10" colspan="5"></td>
</tr>
<tr>
<td align="center" width="100%" colspan="5">
<p><font id="salient3">您的个人详细信息:</font></p>
</td>
</tr>
<tr>
<td align="center" width="100%" colspan="5">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" id="table1">
<tr>
<td width="100%">
<form method="POST" action="userinfo2.asp">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="50%" height="30">用户名:</td>
<td width="50%" height="30"><input type="hidden" name="UserName" value="<% = UserName %>"><% = UserName %></td>
</tr>
<tr>
<td width="50%" height="30">姓名:</td>
<td width="50%" height="30"><% = FirstName %><% = LastName %></td>
</tr>
<tr>
<td width="50%" height="30">电子邮件地址:</td>
<td width="50%" height="30"><input type="text" name="Email" size="20" value="<% = Email %>"></td>
</tr>
<tr>
<td width="50%" height="30">QQ号码或者MSN帐号:</td>
<td width="50%" height="30"><input type="text" name="QQMSN" size="20" value="<% = QQMSN %>"></td>
</tr>
<tr>
<td width="50%" height="30">住址:</td>
<td width="50%" height="30"><input type="text" name="Address" size="20" value="<% = Address %>"></td>
</tr>
<tr>
<td width="50%" height="30">城市:</td>
<td width="50%" height="30"><input type="text" name="City" size="20" value="<% = City %>"></td>
</tr>
<tr>
<td width="50%" height="30">省份:</td>
<td width="50%" height="30"><input type="text" name="State" size="20" value="<% = State %>"></td>
</tr>
<tr>
<td width="50%" height="30">邮政编码:</td>
<td width="50%" height="30"><input type="text" name="ZipCode" size="20" value="<% = ZipCode %>"></td>
</tr>
<tr>
<td width="50%" height="30">国家:</td>
<td width="50%" height="30"><% = Country %></td>
</tr>
<tr>
<td width="50%" height="30">介绍人:</td>
<% If Referral <> "" Then %>
<td width="50%" height="30"><% = Referral %></td>
<% Else %>
<td width="50%" height="30">没有介绍人</td>
<% End If %>
</tr>
<tr>
<td width="50%" height="30"><font size="5">收款方式:</font></td>
<td width="50%" height="30">
<font size="5">
<% Select Case PaymentMethod %>
<% Case "工行卡" %>
<select size="1" name="D1" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select>
<% Case "建行卡" %>
<select size="1" name="D14" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case "交行卡" %> <select size="1" name="D11" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case "农行卡" %> <select size="1" name="D15" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case "招行卡" %> <select size="1" name="D12" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case "中行卡" %> <select size="1" name="D16" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case "邮政汇款" %> <select size="1" name="D13" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% Case Else %> <select size="1" name="D17" style="font-size: 12pt">
<option>工行卡</option>
<option>中行卡</option>
<option selected>支付宝</option>
<option>EG</option>
</select> <% End Select %></font>
</td>
</tr>
<tr>
<td width="50%" height="30">收款帐户信息:</td>
<td width="50%" height="30"><input type="text" name="PaymentAccount" size="20" value="<% = PaymentAccount %>"></td>
</tr>
<tr>
<td width="50%" height="30">假期模式:</td>
<td width="50%" height="30">
<% If Vacation = True Then %>
<input type="checkbox" name="Vacation" value="ON" checked>
<% Else %>
<input type="checkbox" name="Vacation" value="ON">
<% End if %>
</td>
</tr>
<tr>
<td width="100%" height="30" colspan="2" align="center">
如果您外出度假,不想收信,请在假期模式选择框里打勾
</td>
</tr>
<tr>
<td width="100%" height="30" colspan="2" align="center">
<input type="submit" value="修改个人信息" name="Button"></td>
</tr>
</table>
</div>
</form>
</td>
</tr>
<tr>
<td width="100%">
<form method="POST" action="userinfo3.asp">
<input type="hidden" name="UserName" value="<% = UserName %>">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td width="100%" height="30" colspan="2" align="center">
修改密码</td>
</tr>
<tr>
<td width="50%" height="30">旧密码:</td>
<td width="50%" height="30"><input type="password" name="OldPassWord" size="20"></td>
</tr>
<tr>
<td width="50%" height="30">新密码:</td>
<td width="50%" height="30"><input type="password" name="NewPassWord" size="20"></td>
</tr>
<tr>
<td width="50%" height="30">确认新密码:</td>
<td width="50%" height="30"><input type="password" name="ConfirmNewPassWord" size="20"></td>
</tr>
<tr>
<td width="100%" height="30" colspan="2" align="center">
<input type="submit" value="修改密码" name="Button2"></td>
</tr>
</table>
</div>
</form>
</td>
</tr>
<tr>
<td width="100%">
<form method="POST" action="unsubscribe.asp">
<input type="hidden" name="UserName" value="<% = UserName %>">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td width="100%" height="30" align="center"><b><font color="#FF0000">删除帐户</font></b></td>
</tr>
<tr>
<td width="100%" height="30"><b>如果您删除您的帐户,您将失去您的所有所得和下线。输入您的密码,然后点击下面的删除按钮:</b></td>
</tr>
<tr>
<td width="100%" height="30" align="center"><input type="password" name="CancelPassWord" size="20"></td>
</tr>
<tr>
<td width="100%" height="30" align="center">
<input type="submit" value="删除帐户" name="Button3"></td>
</tr>
</table>
</div>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
在上面这些内容中,修改密码是可行的,但是修改个人信息不行.
我也不最多怎么改.望大家指点迷津

下面是个人信息判定页面
<%
UserName2 = Request ("UserName"
Email = Request ("Email"
QQMSN = Request ("QQMSN"
Address = Request ("Address"
City = Request ("City"
State = Request ("State"
ZipCode = Request ("ZipCode"
PaymentMethod = Request ("PaymentMethod"
PaymentAccount = Request ("PaymentAccount"
Vacation = Request ("Vacation"
If Vacation = "" Then
Vacation = False
Else
Vacation = True
End if
If UserName <> UserName2 Then
Conn.Close
Session ("Message" = "产生未知错误,请再试一次。"
Response.Redirect "error.asp"
End if
rs.Open "Update member Set Email = '" & Email & "', QQMSN = '" & QQMSN & "', Address = '" & Address & "', City = '" & City & "', State = '" & State & "', ZipCode = '" & ZipCode & "', PaymentMethod = '" & PaymentMethod & "', PaymentAccount = '" & PaymentAccount & "', Vacation = " & Vacation & " Where UserName = '" & UserName & "'",Conn
Conn.Close
Session ("Message" = "个人信息修改成功。"
Response.Redirect "success.asp"
%>

帮帮忙吧大家~~~~~



蓝鲸

职务:版主
等级:5
金币:42.1
发贴:2614
#22006/3/17 14:00:44
这么长代码,挑简要的说,不要浪费别人时间
要说什么呢


非常大鱼

jackbeenwz

职务:普通成员
等级:1
金币:0.0
发贴:11
#32006/3/17 14:16:03
就是说前面的那段改个人信息失败的原因是什么!!!!!!!!!!!!!!!!



天使ηò哭

职务:普通成员
等级:1
金币:0.0
发贴:82
#42006/3/20 15:58:14
是不是值没传过去,在表单里加上隐藏域试试呢?



jackbeenwz

职务:普通成员
等级:1
金币:0.0
发贴:11
#52006/3/21 1:15:24
有隐藏域USERNAME啊



缺缺

职务:管理员
等级:8
金币:41.0
发贴:9620
#62006/3/21 9:50:51

说了是Request ("PaymentMethod"没有嘛~
你没有传递,如何获取呢

把收款方式那儿的select的name值改成PaymentMethod