Login   Register  
PHP Classes
elePHPant
Icontem

File: examples.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roberto Aleman  >  Auto HTML Forms  >  examples.php  >  Download  
File: examples.php
Role: Example script
Content type: text/plain
Description: examples
Class: Auto HTML Forms
Compose and output HTML forms
Author: By
Last change:
Date: 5 years ago
Size: 3,710 bytes
 

Contents

Class file image Download
<?php 
/*Class autohtmlforms v 1.0 is used for engine basic html form, textfields, textareas,radio buttons, check buttons, and form, hr, br and label tags,
is a easy way to modular oop with php Author : Roberto Aleman, Email: ventics@gmail.com */
require_once("autohtmlforms.php");
$newtextf = new autohtmlforms(); //create textfield objet
$newbutton = new autohtmlforms();//create button objet
$newtextA = new autohtmlforms();//create textarea objet
$newcheckB = new autohtmlforms();//create checkbox objet
$newradioB = new autohtmlforms();//create radio objet
$newform= new autohtmlforms();//create form objet
//engine messages 
$new_label = new autohtmlforms();
//engine <br> html tag
$newbr = new autohtmlforms();
$jump $newtextf->Br();
//engine <hr> html tag
$newhr = new autohtmlforms();
$hr $newhr->Hr();
// end form tag
$endform = new autohtmlforms();
/* Explane use*/
echo $newform->FormEng("examples.php","post","","form1","_self");  //"action url","method: get or post","encoding","form name","target"
echo $hr.$new_label->nlabeleng("Example of Textfield").$jump.$jump;
echo 
$newtextf->TextFieldEng("Nombre","text","","50","50");  //"name","type","value","size","maxlegth"
echo $newtextf->TextFieldEng("Apellido","text","","50","50");  //"name","type","value","size","maxlegth"
echo $hr.$new_label->nlabeleng("Example of Text Area").$jump.$jump;
echo 
$newtextA->TextAreaEng("Comentario","50","10");  //,"TextAreaName","columns","rows"
echo $hr.$new_label->nlabeleng("Example of Button").$jump.$jump;
echo 
$newbutton ->ButtonEng("submit","submit","Submit");  //,"ButtonName","Buttontype","buttonvalue"
echo $hr.$new_label->nlabeleng("Example of Check Button").$jump.$jump;
echo 
$newcheckB ->Checkbuttoneng("CheckButtonName","checkbox","ValueCheckButton","checked");  //"CheckButtonName","checkbox","ValueCheckButton","checked"
echo $newcheckB ->Checkbuttoneng("CheckButtonName","checkbox","ValueCheckButton","");  //"CheckButtonName","checkbox","ValueCheckButton","" <--- unchecked
echo $hr.$new_label->nlabeleng("Example of Radio Button").$jump.$jump;
echo 
$newradioB ->Radiobuttoneng("RadioButtonName","radio","ValueRadioButton","checked");  //"RadioButtonName","Radio","ValueRadioButton","checked"
echo $newradioB ->Radiobuttoneng("RadioButtonName","radio","ValueRadioButton","");  //"RadioButtonName","Radio","ValueRadioButton","" <--- unchecked
echo $endform->endForm(); //show </form> tag if you not closed the form with submit buttom
?>
<p>/* this example engine is*/</p>
<p>&lt;form action='examples.php' method='post' enctype='' name='form1' target='_self'&gt;&lt;hr \&gt;    &lt;label&gt;Example of Textfield&lt;/label&gt;&lt;br \&gt;&lt;br \&gt;Nombre:&lt;input name='Nombre' type='text' value='' size='50' maxlength='50' /&gt;Apellido:&lt;input name='Apellido' type='text' value='' size='50' maxlength='50' /&gt;&lt;hr \&gt;    &lt;label&gt;Example of Text Area&lt;/label&gt;&lt;br \&gt;&lt;br \&gt;Comentario:&lt;textarea name='Comentario' cols='50' rows='10'&gt;&lt;/textarea&gt;&lt;hr \&gt;    &lt;label&gt;Example of Button&lt;/label&gt;&lt;br \&gt;&lt;br \&gt;&lt;input name='submit' type='submit' value='Submit'&gt;&lt;/form&gt;&lt;hr \&gt;    &lt;label&gt;Example of Check Button&lt;/label&gt;&lt;br \&gt;&lt;br \&gt;&lt;input name='CheckButtonName' type='checkbox' value='ValueCheckButton' checked='checked'&gt;&lt;input name='CheckButtonName' type='checkbox' value='ValueCheckButton'&gt;&lt;hr \&gt;    &lt;label&gt;Example of Radio Button&lt;/label&gt;&lt;br \&gt;&lt;br \&gt;&lt;input name='RadioButtonName' type='radio' value='ValueRadioButton' checked&gt;&lt;input name='RadioButtonName' type='radio' value='ValueRadioButton'&gt;&lt;/form&gt;</p>