You have to send the form data to a PHP script (see
PHP: Dealing with Forms - Manual[
^]).
Within your PHP script read the data as described in the above link and act accordingly. For database access use
PHP: MySQLi - Manual[
^].
[EDIT]
To determine the state of a checkbox, check if the corresponding data is set:
$b1 = FALSE;
if (isset($_POST['B1'])) {
$b1 = TRUE;
}
[/EDIT]