<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Class_form.php: examples</title>
</head>
<body>
<?php
require_once "class_form.php";
$dParam = array('action' => $_SERVER['PHP_SELF']);
$dClass = array(
'submit' => 'classSubmit',
'text' => 'myrowtext');
// create the object
$form = new form($dParam, $dClass);
// put the form TAG
echo $form->begin();
// put différents fields
echo $form->text('NAME',"it's the text name field");
echo "<br>";
echo $form->password("PASSWORD");
echo "<br>";
echo "here is your hastable dClass";
echo "<br>";
echo $form->select("PARAM",$dClass);
echo "<br>";
echo "here is your hastable dParam under multiple list form";
echo "<br>";
echo $form->select("PARAM",$dParam,'',TRUE);
echo "<br>";
echo $form->textarea('TEXTAREA','here the textarea field');
echo "<br>";
echo "do you like its class?\n";
echo 'yes'.$form->radio("CLASS",'yes',TRUE);
echo 'no'.$form->radio("CLASS",'no');
echo "<br>";
echo "you have use theses functions to create this form:\n";
echo "<br>";
echo 'form'.$form->checkbox("FUNCTION[]",'form',TRUE);
echo 'begin'.$form->checkbox("FUNCTION[]",'begin',TRUE);
echo 'text'.$form->checkbox("FUNCTION[]",'text',TRUE);
echo 'password'.$form->checkbox("FUNCTION[]",'password',TRUE);
echo 'select'.$form->checkbox("FUNCTION[]",'select',TRUE);
echo 'option_select'.$form->checkbox("FUNCTION[]",'option select',TRUE);
echo 'textarea'.$form->checkbox("FUNCTION[]",'textarea',TRUE);
echo 'radio'.$form->checkbox("FUNCTION[]",'radio',TRUE);
echo 'submit'.$form->checkbox("FUNCTION[]",'submit');
echo 'reset'.$form->checkbox("FUNCTION[]",'reset');
echo 'endform'.$form->checkbox("FUNCTION[]",'endform',TRUE);
// end of the form
echo $form->endform();
?>
</body>
</html>
|