title: MySQL datetime format
body: <p>I am creating a registration page in HTML, PHP, and MySQL. I want to add a hidden field in the registration to be used as join date.</p>
  
  <p>Is it better to have the hidden field containing the current date and time or assigning a variable the current datetime and using that in the SQL insert statement instead?</p>
  
  <p>Anyways, if the following hidden form field is used, what would the date format be to store the datetime as <code>2010-07-06 07:55:12</code>?</p>
  
  <pre><code>&lt;input name="joindate" type="hidden" id="joindate"  value="&lt;?php echo date(''); ?&gt;"&gt;
  </code></pre>