Form
in package
Generate form with safe statements (Sanitize, Verify, CSRF)
Table of Contents
Properties
- $InputConfig : array<string|int, mixed>
Methods
- createContactForm() : void
- Create a classic contact form
- createForm() : void
- Renamme a file et move it on a temp folder
- createLoginForm() : void
- Create a classic login form
- createRegisterForm() : void
- Create a classic register form
- getForm() : void
- Each time you get a form, whatever it is, verify the CSRF and the posted values
Properties
$InputConfig
private
array<string|int, mixed>
$InputConfig
Methods
createContactForm()
Create a classic contact form
public
static createContactForm(string $FormName) : void
Parameters
- $FormName : string
-
name of the form to chech once submitted
Return values
void —echo the whole form
createForm()
Renamme a file et move it on a temp folder
public
static createForm([mixed $NbCheckbox = null ][, mixed $NbColor = null ][, mixed $NbDate = null ][, mixed $NbDateTimeLocal = null ][, mixed $NbEmail = null ][, mixed $NbFile = null ][, mixed $NbImage = null ][, mixed $NbMonth = null ][, mixed $NbNumber = null ][, mixed $NbPassword = null ][, mixed $NbRadio = null ][, mixed $NbRange = null ][, mixed $NbSearch = null ][, mixed $NbTel = null ][, mixed $NbText = null ][, mixed $NbTime = null ][, mixed $NbUrl = null ][, mixed $NbWeek = null ]) : void
Parameters
- $NbCheckbox : mixed = null
- $NbColor : mixed = null
- $NbDate : mixed = null
- $NbDateTimeLocal : mixed = null
- $NbEmail : mixed = null
- $NbFile : mixed = null
- $NbImage : mixed = null
- $NbMonth : mixed = null
- $NbNumber : mixed = null
- $NbPassword : mixed = null
- $NbRadio : mixed = null
- $NbRange : mixed = null
- $NbSearch : mixed = null
- $NbTel : mixed = null
- $NbText : mixed = null
- $NbTime : mixed = null
- $NbUrl : mixed = null
- $NbWeek : mixed = null
Return values
void —the form with the numnber of each HTML's inputs asked
createLoginForm()
Create a classic login form
public
static createLoginForm(string $FormName) : void
Parameters
- $FormName : string
-
name of the form to chech once submitted
Return values
void —echo the whole form
createRegisterForm()
Create a classic register form
public
static createRegisterForm(string $FormName) : void
Parameters
- $FormName : string
-
name of the form to chech once submitted
Return values
void —echo the whole form
getForm()
Each time you get a form, whatever it is, verify the CSRF and the posted values
public
static getForm() : void
Return values
void —function not finished yet