PHP code example of zerig / form-manager

1. Go to this page and download the library: Download zerig/form-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zerig / form-manager example snippets


$form = new \FormManager\Insert("form");
$form->send();	// only if form was send

// BEFORE pushing button SUBMIT
$form->getData("man", 0, "name") => ""
$form->getData("man", 0, "age")  => ""

// AFTER pushing button SUBMIT
$form->getData("man", 0, "name") => "Jeronym"
$form->getData("man", 0, "age")  => "28"


$form = new \FormManager\Insert("form");
$form->send([
	"man" => [
		[0] => [
			"age" => 99
		]
	]
]);

// BEFORE pushing button SUBMIT
$form->getData("man", 0, "name") => ""
$form->getData("man", 0, "age")  => ""

// AFTER pushing button SUBMIT
$form->getData("man", 0, "name") => "Jeronym"	// WRITTEN VALUE
$form->getData("man", 0, "age")  => "99"		// FIXED VALUE not WRITTEN


$form = new \FormManager\Update("form");
$form->send();	// only if form was send

$form->getData("man", 0, "name") => ""
$form->getData("man", 0, "age")  => ""

html
<form method="POST">
	 $table = "man"; 
html
<form method="POST">
	 $table = "man"; 
html
<form method="POST">
	 for($i = 1; $i < 1; $i++){