Pearhtmlhtml

xiaoxiao2021-03-06  117

The HTML_FORM class is a class file that quickly generates the Form form. It is generally used in the PHP file that holds the code cleaner (avoiding too much PHP code and HTML code intertwined together), which does not apply to a page with high appearance.

usage:

Require_once ('html / form.php');

$ form = new html_form ($ _ server ['php_self'], 'pos');

$ form -> addtext ('name', 'name ",', 20);

$ form -> addpassword ('password', 'password', ', 10);

$ form -> addcheckbox ('language []', 'php', 'php');

$ form -> addcheckbox ('language []', 'delphi', '');

$ form -> addselect ('INCOME', 'INCOME', Array ('<1000', '<2000'));

$ form -> addtextarea ('Note', 'Description', '', 20, 15);

$ form -> addradio ('gender', 'gender', 'Male');

$ form -> addradio ('gender', 'gender'); "FEMALE ');

$ form -> addhidden ('id', '1001');

$ form -> addsubmit ('Submit', 'Send');

$ form -> addreset ('reset');

$ FORM -> Display ();

?>

All of the function lists are as follows:

-------------------------------------------------- -

Function HTML_FORM ($ action, $ method = 'get', $ name = ', $ target =', $ encType = ')

Function AddText ($ Name, $ TITLE, $ Default = '',

Function AddPassword ($ Name, $ TITLE, $ DEFAULT, $ SIZE = HTML_FORM_PASSWD_SIZE)

Function Addcheckbox ($ Name, $ TITLE, $ DEFAULT)

Function AddTextArea ($ Name, $ TITLE, $ Default,

Function AddSubmit ($ Name = "Submit", $ title = "Submit Changes")

Function AddReset ($ title = "Discard Changes")

Function AddSelect ($ Name, $ TITLE, $ 2011, $ default = ', $ size = 1, Function AddRadio ($ Name, $ Title, $ Value, $ Default = false)

Function AddImage ($ Name, $ SRC)

Function AddHidden ($ Name, $ Value)

Function AddBlank ($ I, $ TITLE = '')

Function AddFile ($ Name, $ TITLE, $ MAXSIZE = HTML_FORM_MAX_FILE_SIZE,

Function start ()

Function end ()

Function Displaytext ($ Name, $ Default = '),

Function DisplaytexTrow ($ Name, $ Title, $ Default = '",

Function DisplayPassword ($ Name, $ Default = ', $ size = HTML_FORM_PASSWD_SIZE)

Function DisplayPasswordRow ($ Name, $ TITLE, $ Default = ', $ size = HTML_FORM_PASSWD_SIZE)

Function DisplayCheckbox ($ Name, $ Default = FALSE)

Function DisplayCheckboxrow ($ Name, $ TITLE, $ DEFAULT = FALSE)

Function DisplaytextArea ($ Name, $ Default = ', $ width = 40,

Function DisplaytexTareroW ($ Name, $ TITLE, $ Default = ', $ width = 40,

Function DisplaySubmit ($ Title = 'Submit Changes', $ Name = "Submit")

Function DisplaySubmitrow ($ name = "submit", $ title = 'Submit Changes')

Function Displayreset ($ TITLE = 'CLEAR Contents')

Function DisplayRestrow ($ TITLE = 'Clear Contents')

Function DisplaySelect ($ Name, $ Entries, $ Default = ', $ size = 1,

Function DisplaySelectrow ($ Name, $ TITLE, & $ Entries, $ default = ',

Function Displayhidden ($ Name, $ Value)

Function DisplayRadio ($ Name, $ Value, $ Default = FALSE)

Function DisplayRadiorow ($ Name, $ TITLE, $ Value, $ default = false)

Function DisplayBlank ()

Function DisplayBlankRow ($ I, $ TITLE = '')

Function DisplayFile ($ name, $ mapize = HTML_FORM_MAX_FILE_SIZE, FUNCTION DISPLAYFILEROW ($ Name, $ TITLE, $ MAXSIZE = HTML_FORM_MAX_FILE_SIZE,

Function ReturnText ($ Name, $ Default = ', $ size = HTML_FORM_TEXT_SIZE)

Function ReturNTexTrow ($ Name, $ TITLE, $ Default = ', $ size = HTML_FORM_TEXT_SIZE)

Function ReturnPassword ($ Name, $ Default = ', $ size = HTML_FORM_PASSWD_SIZE)

Function ReturnPasswordRow ($ Name, $ TITLE, $ DEFAULT = ', $ size = html_form_passwd_size)

Function ReturnCheckbox ($ Name, $ Default = False)

Function ReturncheckBoxRow ($ Name, $ TITLE, $ DEFAULT = FALSE)

Function ReturnTextArea ($ Name, $ Default = ', $ Width = 40, $ Height = 5)

Function ReturnTextArow ($ Name, $ TITLE, $ Default = ', $ width = 40, $ height = 5)

Function Returnsubmit ($ Title = 'Submit Changes ", $ Name =" Submit ")

Function Returnsubmitrow ($ name = "submit", $ title = 'submit changes')

Function ReturnreSet ($ TITLE = 'CLEAR Contents')

Function ReturnResetRow ($ Title = 'Clear Contents')

Function Returnselect ($ Name, $ Entries, $ Default = ', $ size = 1,

Function Returnselectrow ($ Name, $ TITLE, & $ Entries, $ default = ', $ size = 1,

Function Returnhidden ($ Name, $ Value)

Function ReturnFile ($ Name = 'Userfile ",

Function ReturnMultiplefiles ($ name = 'userfile [],

Function ReturnStart ($ MultipartformData = FALSE)

Function Returnend ()

Function Display ()

转载请注明原文地址:https://www.9cbs.com/read-101533.html

New Post(0)