File: example

Recommend this page to a friend!
  Classes of Abraham Salazar  >  Form Validate Class  >  example  >  Download  
File: example
Role: Example script
Content type: text/plain
Description: example script
Class: Form Validate Class
Generate forms with Javascript based validation
Author: By
Last change:
Date: 14 years ago
Size: 1,932 bytes


Class file image Download
$Form = new FORM_VALIDATE;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<body bgcolor="#008080">


#uncoment this variables and refresh example.php page for view changes
$firstname="First name here";
$lastname="Lastname here";
$adress="Adress here";
$username="Username here";

$Form -> style ("<font color='#FFFFFF'><b> +label+ </b></font> <br> ");
$Form ->empty_value_error ("Please check +field+ ");

$Form -> form_open ("form",$action="");

$Form -> input_hidden ("id","yes");?>

<tr><td><?$Form -> input_text ("firstname","First Name:","yes");?></td></tr>

<tr><td><?$Form -> input_text ("lastname","Last Name:","no");?></td></tr>

$Form -> radio_button ("sex",$radios,"yes","Sex:");?></td>

    <td><?$select_lang[false]="Please select your language"; #key false for empty value
$select_lang[fr]="French [fr]";
$select_lang[es]="Spanish [es]";
$select_lang[en]="English [en]";
$Form -> select ("language",$select_lang,"yes","Language:");?></td>

<tr><td><?$Form -> textarea ("adress","Address:","yes","35","7");?></td></tr>

<tr><td><?$Form -> file ("foto","Your display image:");?></td></tr>

<tr><td><?$Form -> checkbox ("agree","iagree","yes","I agree");?></td></tr>

<tr><td><?$Form -> input_text ("username","User Name:","yes");?></td></tr>

<tr><td><?$Form -> input_pass ("pass","Password","yes");?></td></tr>

    <td><?$Form -> submit ("send","Send Form");
"&nbsp;"; $Form -> reset ("reset","Reset Form");?></td>

<?$Form -> form_close ();?>


For more information send a message to info at phpclasses dot org.