CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 CCS compare new and confirmed password

Print topic Send  topic

Author Message
kenara
Posted: 05/05/2002, 7:00 PM

I want to compare the new and confirmed password when users want to change the password. In the confirmed password text property can I just change the validation rule "=new_password".
Nicole
Posted: 05/08/2002, 6:45 AM

Hello,
I assume that you have added textbox for password confirmation and no table field is selected as its source. So the problem is to create event and display warning message. Ok. Create OnValidate event for the form(!) and here is sample code:

PHP
global $form_name;
$passw = $form_name->password_field->Value;
$confirm = $form_name->confirm_field->Value;
if ($passw != $confirm)
{
$form_name->Errors->addError("<font color = red><b>Password and confirmation do not match</b></font>");
$form_name->confirm_field->SetValue("");
}


ASP
Dim passw: passw = ""
Dim confirm: confirm = ""
passw = form_name.password_field.value
confirm = form_name.confirm_field.value
if CStr(passw)<> CStr(confirm) then
form_name.Errors.addError("<font color = red><b>Password and Confirm do not match</b></font>")
form_name.confirm_field.value = ""
end if

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.