Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Güayoyo  >  Validate_Form  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: little example
Class: Validate_Form
Validate form field values
Author: By
Last change: description for the array
Date: 11 years ago
Size: 832 bytes
 

Contents

Class file image Download
<?Php
$url_ok 
"$PHP_SELF";
$head "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\n"
       
."<html>\n<head>\n\t<TITLE>Example Validate Form</TITLE>\n</head>\n<BODY>\n";
$foot "\n</body>\n</html>\n";
// set in the array to 1 for enable or to 0 for hidden the field
$label = array('lang'=>'it','username'=>'1','email'=>'1','password'=>'1','password2'=>'1','name'=>'0','url'=>'0','age'=>'0','select'=>'0');
if(!isset(
$go)) {
    include(
"./validate.class.php");
    
$obj = new Validate_Form;
    
$obj->set_head($head);
    
$obj->set_foot($foot);
    
$obj->set_url($url_ok);
    
$obj->set_label($label);
    if(!isset(
$ok)) $obj->make_form();
    else 
$obj->check_form($l,$username,$email,$password,$password2,$name,$url,$age);
} else {
    echo 
$head;
    echo 
"OK";
    echo 
$foot;
}
?>