Login   Register  
PHP Classes
elePHPant
Icontem

File: Test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ashish Vishwakarma  >  Validation on General Form Fields  >  Test.php  >  Download  
File: Test.php
Role: Example script
Content type: text/plain
Description: Example File
Class: Validation on General Form Fields
Output form with Javascript based field validation
Author: By
Last change: Some Changes
Date: 2005-12-22 22:58
Size: 1,201 bytes
 

Contents

Class file image Download
<?
    
include("validation.class.php");
    
$test=new Validation;
?>
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table border="1" cellspacing="0" cellpadding="2">
<?
    $country
[IN]="India";
    
$country[US]="USA";
    
$country[JP]="Japan";
    
$city[D]="Delhi";
    
$city[B]="Bombay";
    
$city[P]="Pune";
    print 
$test->startForm("frmRegistration","test.php","post","yes");
    print 
"<tr><td>Name*</td><td>".$test->getTextBox("Name","yes")."</td></tr>";
    print 
"<tr><td>Password*</td><td>".$test->getPassword("Password","yes")."</td></tr>";
    print 
"<tr><td>Address*</td><td>".$test->getTextBox("Address","yes")."</td></tr>";
    print 
"<tr><td>Country*</td><td>".$test->getCombo("Country",$country,"yes")."</td></tr>";
    print 
"<tr><td>Ph</td><td>".$test->getTextBox("Ph","no")."</td></tr>";
    print 
"<tr><td>City</td><td>".$test->getCombo("City",$city,"no")."</td></tr>";
    print 
"<tr><td>Sex*</td><td>".$test->getCheckBox("Sex","yes")."&nbsp;Male&nbsp;</td></tr>";
    print 
"<tr><td colspan='2'>".$test->getSubmit("Save")."</td></tr>";
    print 
$test->endForm();
    print 
$test->getValidCode();
?>
</table>
</body>
</html>