Why is the value of date not being added to DB?
<p>Here's the complete form:</p>

<p>
          
        
        
        
        
        $(document).ready(function() {
            $( "#datepicker" ).datepicker();
        });
        </p>

<pre><code>    &lt;div class="labelContainer"&gt;
        &lt;label for="Date"&gt;Date&lt;/label&gt;
    &lt;/div&gt;
              &lt;div class="labelContainer"&gt;
         &lt;label for="Category"&gt;Category&lt;/label&gt;
         &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
        &lt;select name="category" id="category" value="category" class="form-control ddplaceholder" style="width:220px;font-size:18px;font-family:Roboto;"&gt;
             &lt;option value="" disabled selected&gt;Select Category&lt;/option&gt;
        &lt;?php
        $sth = $conn-&gt;prepare('Select name From category');
        $sth-&gt;execute();
        $data = $sth-&gt;fetchAll();   
        foreach ($data as $row ){
            if($row['name']!="")
         echo ' &lt;option id=\"CategoryName\" nameCategoryNameVendorName\" value="' .$row['name']. '"&gt;'.$row['name'].'&lt;/option&gt;';
        }
        ?&gt; 
        &lt;/select&gt;&lt;/div&gt;&lt;br&gt;


    &lt;br&gt;


            &lt;div class="labelContainer"&gt;
         &lt;label for="Item"&gt;Item&lt;/label&gt;
         &lt;/div&gt;
            &lt;div class="inputContainer"&gt;
        &lt;select name="item_name" id="item_name" value="item_name" class="form-control ddplaceholder" style="width:220px;font-size:18px;font-family:Roboto;"&gt;
         &lt;option value="" disabled selected&gt;Select Item&lt;/option&gt;
        &lt;?php
        $sth = $conn-&gt;prepare('Select item_name From item');
        $sth-&gt;execute();
        $data = $sth-&gt;fetchAll();   
        foreach ($data as $row ){
        if($row['item_name']!="")
        echo " &lt;option id=\"ItemName\" name=\"ItemName\" value=".$row['item_name']."&gt;".$row['item_name']."&lt;/option&gt;";
        }
        ?&gt; 
        &lt;/select&gt;&lt;/div&gt;&lt;br&gt;



         &lt;div class="labelContainer"&gt;
         &lt;label for="Vendor"&gt;Vendor&lt;/label&gt;
         &lt;/div&gt;
        &lt;div class="inputContainer"&gt;
        &lt;select name="vendor_name" id="vendor_name" value="vendor_name" class="form-control ddplaceholder" style="width:220px;font-size:18px;font-family:Roboto;"&gt;
        &lt;option value="" disabled selected&gt;Select Vendor&lt;/option&gt;
        &lt;?php
        $sth = $conn-&gt;prepare('Select name From vendor');
        $sth-&gt;execute();
        $data = $sth-&gt;fetchAll();   
        foreach ($data as $row ){
        if($row['name']!="")
        echo " &lt;option id=\"VendorName\" name=\"VendorName\" value=".$row['name']."&gt;".$row['name']."&lt;/option&gt;";
        }
        ?&gt; 
        &lt;/select&gt;&lt;/div&gt;&lt;br&gt;


    &lt;div class="labelContainer"&gt;
   &lt;label for="Unit"&gt;Unit&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
    &lt;input type="text" placeholder="Unit" id="Unit" name="Unit" &gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;div class="labelContainer"&gt;
   &lt;label for="Price_per_Unit"&gt;Price_per_Unit&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
    &lt;input type="text" placeholder="Price per Unit" name="Price_per_Unit" id="Price_per_Unit"&gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;div class="labelContainer"&gt;
   &lt;label for="Quantity"&gt;Quantity&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
    &lt;input type="text" placeholder="Quantity" name="Quantity" id="Quantity"&gt;&lt;br&gt;
    &lt;/div&gt;

    &lt;div class="labelContainer"&gt;
   &lt;label for="VAT"&gt;VAT&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
    &lt;input type="text" placeholder="VAT" name="VAT" id="VAT"&gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;div class="labelContainer"&gt;
   &lt;label for="Freight_charges"&gt;Freight_charges&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
   &lt;input type="text" placeholder="Freight charges" id="Freight_charges" name="Freight_charges"&gt;&lt;br&gt;
    &lt;/div&gt;

    &lt;div class="labelContainer"&gt;
   &lt;label for="Other_Charges"&gt;Other_Charges&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
   &lt;input type="text" placeholder="Other Charges" id="Other_Charges" name="Other_Charges"&gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;div class="labelContainer"&gt;
   &lt;label for="Total"&gt;Total&lt;/label&gt;
     &lt;/div&gt;
    &lt;div class="inputContainer"&gt;
    &lt;input type="text" placeholder="Total" id="Total" name="Total"&gt;&lt;br&gt;
    &lt;/div&gt;

        &lt;input type="submit" name="submit" value="Update" style="width:150px;padding:10px;"&gt;
        &lt;?php 
        $date="";
        $category_value="";
        $item_value="";
        $vendor_value="";
        $unit_value="";
        $price_rate_value=0;
        $quantity_value=0;
        $vat_value=0;
        $freight_value=0;
        $other_charges_value=0;
        $total_value=0;  
        if(!empty($_POST['category']))
        {
        $category_value=$_POST['category'];
        }
        if(!empty($_POST['item_name']))
        {
        $item_value=$_POST['item_name'];
        }
        if(!empty($_POST['vendor_name']))
        {
        $vendor_value=$_POST['vendor_name'];
        }
        if(!empty($_POST['Unit']))
        {
        $unit_value=$_POST['Unit'];
        }
        if(!empty($_POST['Price_per_Unit']))
        {
        $price_rate_value=$_POST['Price_per_Unit'];
        }
        if(!empty($_POST['Quantity']))
        {
        $quantity_value=$_POST['Quantity'];
        }
        if(!empty($_POST['Freight_charges']))
        {
        $freight_value=$_POST['Freight_charges'];
        }
        if(!empty($_POST['Other_charges']))
        {
        $other_charges_value=$_POST['Other_charges'];
        }
       if(!empty($_POST['VAT']))
        {
        $vat_value=$_POST['VAT'];
        } 
        $total_value= ($price_rate_value * $quantity_value)+$freight_value+$other_charges_value+$vat_value;

        $sql='INSERT INTO bill(date, category, item, vendor, unit, price_per_unit, quantity, vat, freight_charges, other_charges, total) '
    . 'values (:date,:category, :item,:vendor, :unit, :price_per_unit, :quantity, :vat, :freight_charges, :other_charges, :total)';
             $sth=$conn-&gt;prepare($sql); 
            $sth-&gt;execute(array(':date'=&gt;$date,':category'=&gt;$category_value,':item'=&gt;$item_value, ':vendor'=&gt;$vendor_value,
                ':unit'=&gt;$unit_value,':price_per_unit'=&gt;$price_rate_value,':quantity'=&gt;$quantity_value,':vat'=&gt;$vat_value,
                ':freight_charges'=&gt;$freight_value,':other_charges'=&gt;$other_charges_value,':total'=&gt;$total_value));              

        ?&gt;
 &lt;/form&gt;
</code></pre>

<p>How can I add the date? Have already tried what the answers currently say. Is it because there's no submit associated with date? Could it be because of that?</p>