I'm in the middle of developing a html form whose data gets saved into a MS-SQL server database. I'm able to get all other fields get saved to their respective columns in the database, however the checkbox field leaves the value null. 
I'm not very familiar with that concept.

Here's the code:

form.php

```
<form class="cmxform" action ='functions/Form.php'  method="post">
<div class="form-row">

                   <h3> Contact Information</h3>
                    <div class="form-group col-md-4">
                        <label for="fName">First Name </label>
                        <input type="text" class="form-control" id="fName" name="fName">
                    </div>
                    <div class="form-group col-md-4">
                        <label for="lName">Last Name</label>
                        <input type="text" class="form-control" id="lName" name="lName">
                    </div>
                    <div class="form-group col-md-4">
                        <label for="email">Email </label>
                        <input type="email" class="form-control" id="email" name="email">
                    </div>
                </div>
<div class="form-group col-md-12">
<h3>Category: Please choose one of the following: </h3>
     <div class="form-check">
   <input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
       <label class="form-check-label" for="defaultCheck1">
           Vegetarian
     </div>
<div class="form-check">
         <input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
         <label class="form-check-label" for="defaultCheck1">
        Ham
         </label> 
     </div>
<div class="form-check">
    <input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
    <label class="form-check-label" for="defaultCheck1">
         Turkey
         </label>
</div>
<div class="form-check">
    <input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
         <label class="form-check-label" for="defaultCheck1">
        Other
    </label>
</div>

```

functions/form.php:

```
<?php
require_once 'connection.php';
$fName = filter_input(INPUT_POST, "fName") ? filter_input(INPUT_POST, 'fName') : null;
$lName = filter_input(INPUT_POST, "lName") ? filter_input(INPUT_POST, 'lName') : null;
$email = filter_input(INPUT_POST, "email") ? filter_input(INPUT_POST, 'email') : null;
$tempCheck1 = filter_input(INPUT_POST, "defaultCheck1") ? filter_input(INPUT_POST, 'defaultCheck1') : null;
$tempCheck2 = filter_input(INPUT_POST, "defaultCheck2") ? filter_input(INPUT_POST, 'defaultCheck2') : null;
$tempCheck3 = filter_input(INPUT_POST, "defaultCheck3") ? filter_input(INPUT_POST, 'defaultCheck3') : null;
$tempCheck4 = filter_input(INPUT_POST, "defaultCheck4") ? filter_input(INPUT_POST, 'defaultCheck4') : null;
$sqlInsert = "INSERT INTO dbo.form (fName, lName, email, category ) VALUES (:fName, :lName, :email, :defaultCheck1, :defaultCheck2, :defaultCheck3, :defaultCheck4)
$stmt = $conn->prepare($sqlInsert);
$stmt->bindParam(':fName', $fName);
$stmt->bindParam(':lName', $lName);
$stmt->bindParam(':email', $email);
$stmt->bindParam(':defaultCheck1', $tempCheck1);
$stmt->bindParam(':defaultCheck2', $tempCheck2);
$stmt->bindParam(':defaultCheck3', $tempCheck3);
$stmt->bindParam(':defaultCheck4', $tempCheck4);
if ($stmt->execute()) {
        $conn->commit();
        return true;
    } else {
        $conn->rollback();
        return false;
    }
?>

```

That's the only box in the form I'm stuck sending the data to the database. Rest everything is working fine.