Location: PHPKode > scripts > Compare Validator > cvExample.php
<HTML dir="rtl">
<HEAD>
<META http-equiv="content-type" content="text/html; charset=utf-8"/>
<TITLE>Hello!</TITLE>
<?PHP
    function __autoload($className)
    {
        require_once $className.'.php';
    }
?>
</HEAD>
<BODY>
<FORM action="" method="post">
<INPUT type="text" id="TextBox1" name="TextBox1" onkeyup="password();"/>
<INPUT type="text" id="TextBox2" name="TextBox2" onkeyup="password();"/>
<?PHP
    $cmp=new CompareValidator('password');
    $cmp->ControlToCompare='TextBox1';
    $cmp->ControlToValidate='TextBox2';
    $cmp->Draw();
?>
<INPUT type="submit" value="Send"/>
</FORM>
<?PHP
    print_r($_POST);
?>
</BODY>
</HTML>
Return current item: Compare Validator