Skip to content

Prashles2/Form-Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read me

This is just a simple class to simplify making forms in PHP.

Sample usage is in form.php

Calling the class

Instanciating the class, there are three optional parameters. $action, $method and $enctype. By default, $action = NULL, $method = 'POST' and $enctype = NULL. And error will be thrown if the $method is not set to POST and an enctype is set.

Executing

$form->show() will return the finished form.

Multiple forms

For multiple forms, you'll need multiple instances of the class.

Usage

Below is some sample usage:

$form = new Form();

$form->label('Username: ');
$form->input('Username');

$form->label('Password: ');
$form->input('password');

$form->submit();

echo $form->show()

More sample code in 'form.php'

About

PHP class to speed up making forms in development and not having to write them in HTML.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages