Site Archives form

Checkbox value


When you post a form with checkbox it dose not return any value when the checkbox is not ticked.
This is something that should have been fixed a long time ago.
But for now here is the solution:
 
<form action="?" method="post">
<input name="myCheckbox" type="hidden" value="0" />
<input name="myCheckbox" type="checkbox" />
</form>
 
You put an hidden input before checkbox input with the same [...]

swapeForm


Here is an easy php 5 class to make dynamic form table.
I made this class to make dynamic forms. With this class you don’t have to write html code for form and a table.
Here is how to use this class:
 
< ?php
include(’swapeForm.php’);
 
$form = new swapeForm();
$form->add(’Name’); // adding input
$form->setAttrib(’id’ , ‘formName’); // adding atributes to [...]