Forums
This topic is locked
Advanced Serverside Validation question
Posted 01 May 2003 04:27:58
1
has voted
01 May 2003 04:27:58 Phil Shevlin posted:
I am having a problem getting the last update to work. Heres my code:<pre id=code><font face=courier size=2 id=code>
<!--#include file="../Connections/cnRealSite.asp" -->
<!--#include file="../Connections/alfacheck.asp" -->
<%
if ((request.Form("ChangePassword"



Dim cmdPassword__UserEmail
cmdPassword__UserEmail = "0"
if(Session("MM_Username"



Dim cmdPassword__UserPassword
cmdPassword__UserPassword = ""
if(Request("password"



set cmdPassword = Server.CreateObject("ADODB.Command"

cmdPassword.ActiveConnection = MM_cnRealSite_STRING
cmdPassword.CommandText = "spUpdatePassword"
cmdPassword.Parameters.Append cmdPassword.CreateParameter("@RETURN_VALUE", 3, 4)
cmdPassword.Parameters.Append cmdPassword.CreateParameter("@UserEmail", 200, 1,50,cmdPassword__UserEmail)
cmdPassword.Parameters.Append cmdPassword.CreateParameter("@UserPassword", 200, 1,50,cmdPassword__UserPassword)
cmdPassword.CommandType = 4
cmdPassword.CommandTimeout = 0
cmdPassword.Prepared = true
cmdPassword.Execute()
dim msgPassword
msgPassword = "Password Changed."
end if
%>
<form action="" method="POST" name="formPassword" id="formPassword">
<table width="300" align="center">
<tr>
<td width="119" nowrap> New Password:</td>
<td width="442"> <input name="password" type="password"><input name="passwordFILLCNFM1" type="hidden" id="passwordFILLCNFM1"><% if FindError(AlfaErrMsg,"password"

</tr>
<tr>
<td nowrap>Confirm Password</td>
<td><input name="confirm" type="password" id="confirm" value=""><input name="confirmFILLCNFM2" type="hidden" id="confirmFILLCNFM2"><% if FindError(AlfaErrMsg,"confirm"


</tr>
<tr align="center">
<td colspan="2" nowrap><%=(msgPassword)%></td>
</tr>
<tr align="center">
<td colspan="2" nowrap>
<input name="ChangePassword" type="hidden" id="changePassword" value="1">
<input type="submit" value="Change Password"> </td>
</tr>
</table>
</form>
</font id=code></pre id=code>