title: Getting a date into the database with php from a datepicker
body: <p>I have a database field called "dateAdvance" with the type of "date".</p>
  
  <pre><code>`dateAdvance` date NOT NULL,
  </code></pre>
  
  <p>In my html I have an input field that has a datepicker jquery attached, so when the user presses the input field  a datepicker appears where you can select a date. The date is going to be in the input field and it is the date that have to be stored in the database.</p>
  
  <pre><code>&lt;dl&gt;
       &lt;dt&gt;&lt;label for="advancePayment"&gt;Acontobetaling:&lt;/label&gt;&lt;/dt&gt;
       &lt;dd&gt;&lt;input type="text" name="advancePayment"/&gt;&lt;/dd&gt;
       &lt;dd&gt;&lt;input type="text" name="dateAdvance" class="datepicker"placeholder="Vælge dato"&gt;&lt;/dd&gt;
  &lt;/dl&gt;
  </code></pre>
  
  <p>I'm using php to save the data:</p>
  
  <pre><code>$dateAdvance=$_POST['dateAdvance']; 
  mysql_query("INSERT INTO creatUser(dateAdvance)
      VALUES('$dateAdvance')");
  </code></pre>
  
  <p>Hope there are some who can help me.</p>