Login   Register  
PHP Classes
elePHPant
Icontem

File: cvExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mohammad Mostafa Shahreki  >  Compare Validator  >  cvExample.php  >  Download  
File: cvExample.php
Role: Example script
Content type: text/plain
Description: Compare Validator Example
Class: Compare Validator
Generate JavaScript to compare two form inputs
Author: By
Last change:
Date: 2011-03-18 02:48
Size: 669 bytes
 

Contents

Class file image Download
<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>