title: I am trying to use datepicker from mdbootstrap but date shows as 0000-00-00 in database
body: <p>I am using a form to submit date, subject, content text and an image to mysql using php. I see that all the data get inserted into the DB properly except date which shows up as <code>0000-00-00</code> in the table row.</p>
  
  <p>I have unable to figure out how to change date format to be sent to DB.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="#" enctype="multipart/form-data" method="post"&gt;
  
          &lt;div class="md-form col-md-6"&gt;
            &lt;label for="date-picker-example"&gt; Event Date : &lt;/label&gt;
            &lt;input type="date" name='news_event_date' id="date-picker-example" class="form-control datepicker"/&gt;
          &lt;/div&gt;
  
          &lt;div class="md-form col-md-6"&gt;
              &lt;label for="form7"&gt;Update Header:&lt;/label&gt;
              &lt;textarea id="form7" class="md-textarea form-control" rows="1" type="text" name="news_header" &gt;&lt;/textarea&gt;
          &lt;/div&gt;
  
            &lt;div class="md-form col-md-6"&gt;
            &lt;label for="form8"&gt;Update Body:&lt;/label&gt;
            &lt;textarea type="text" id="form8" class="md-textarea form-control" name="news_body" rows="2" &gt;&lt;/textarea&gt;
          &lt;/div&gt;
  
          &lt;div class="md-form col-md-6"&gt;
            &lt;label for="form9"&gt;Password : &lt;/label&gt;
            &lt;input id="form9" type="password" name="news_password" class="md-textarea form-control" autocomplete="new-password"/&gt;
          &lt;/div&gt;
  
                &lt;div class="md-form col-md-6"&gt;
            &lt;div class="file-field"&gt;
                &lt;div class="btn btn-primary btn-sm float-left"&gt;
                    &lt;span&gt;Choose files&lt;/span&gt;
                    &lt;input type="file" accept="image/*" name="news_single_file"&gt;
                &lt;/div&gt;
                &lt;div class="file-path-wrapper"&gt;
                &lt;input  class="file-path validate" type="text" placeholder="Upload one or more files"&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;/div&gt;
  
            &lt;button class="btn btn-outline-info btn-rounded btn-block z-depth-0 my-4 waves-effect" type="submit" name="news_submit" value="Subm"/&gt;
    &lt;!--//this div is for latest news--&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>All values are updated as required apart from date.</p>