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 Valentin  >  IDForm  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: IDForm
Compose HTML forms programmatically
Author: By
Last change: update up to new class version
Date: 2009-05-02 23:41
Size: 821 bytes
 

Contents

Class file image Download
<?
require_once 'idform.class.php';

$form= new IDForm();

//complete form
$form->Header('form1','index.php');
$form->Input('input1','text',array('value'=>'some text here','size'=>50));
$form->AddHtml('<br />');
$form->Input('input2','text',array('value'=>'some text here','size'=>50));
$form->AddHtml('<br />');
$form->Select('select1',
    array(
        array(
'value'=>'1','text'=>'option 1'),
        array(
'value'=>'2','text'=>'option 2','selected'),
        array(
'value'=>'3','text'=>'option 3')
    )
);
$form->AddHtml('<br />');
$form->TextArea('textarea1','f****** big text =)',array('cols'=>40,'rows'=>5));
$form->AddHtml('<br />');
$form->Input('submit','submit',array('value'=>'Submit form'));
$form->Input('reset','reset',array('value'=>'Reset form'));
$form->Finish();
//===

echo $form->GetHtml();

?>