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 Johan De Klerk  >  jForm  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: an example
Class: jForm
Simple form generator
Author: By
Last change:
Date: 11 years ago
Size: 1,383 bytes
 

Contents

Class file image Download
<?
    
require('jForm.php');
    
    
$jF = new jForm();
    
    
$form = array('name'=>'testform',
                  
'action'=>$_SERVER['PHP_SELF'],
                  
'method'=>'post',
                  
'enctype'=>'multipart/form-data',
                  
'onsubmit'=>'return');
    
    echo 
$jF->jBeginForm($form);
    
    
$input = array('name'=>'name',
                   
'value'=>'this is a name',
                   
'maxlength'=>30,
                   
'size'=>20);
    
    echo 
$jF->jInput($input);
    echo 
'<br>';
    
    echo 
$jF->jHidden($input);
    
    
$select = array('name'=>'name',
                   
'size'=>'5');
                   
    
$values = array('option1','option2','option3','option4','option5');
    
    echo 
$jF->jSelect($select,$values);
    echo 
'<br>';
    
    
$text = array('name'=>'name',
                  
'rows'=>12,
                  
'cols'=>20,
                  
'wrap'=>'yes');
                  
    
$value 'this string is inside the text area';
    
    echo 
$jF->jTextArea($text,$value);
     echo 
'<br>';
    
    echo 
$jF->jRadioButton($select,$values);
    echo 
'<br>';
    
    echo 
$jF->jCheckBox($select,'This is a check box','yes');
     echo 
'<br>';
     
    echo 
$jF->jReset();
    echo 
'<br>';
    
    echo 
$jF->jSubmit('Submit Now!');
    
    echo 
$jF->jEndForm();
?>