title: PHP and SQL auto insert date and Time
body: <p>I am trying to auto insert date and time into my SQL database when a form is submitted from a php page</p>
  
  <pre><code>$sql="INSERT INTO tracker_msisdn_trace (msisdn, avis_name, date, colour, driver, 
  driver_id, notes)
  VALUES 
  ('$_POST[msisdn]','$_POST[avis_name]','$_POST[date]','$_POST[colour]','$_POST[driver]','$_POST
  [driver_id]','$_POST[notes]')";
  </code></pre>
  
  <p>This is the code I use for Manual inserting data.</p>
  
  <p>To auto insert the day I have tried the following</p>
  
  <pre><code> $date = date("Y-m-d") 
   $_POST[".$date."]
  </code></pre>
  
  <p>I am not getting the date and time inserted into the SQL it shows 0000-00-00</p>
  
  <p>This is my SQL table</p>
  
  <h1>Name    Type    Collation   Attributes  Null    Default Extra</h1>
  
  <p>4   date    date            No  None    </p>
  
  <p>Assistance would be appreciated</p>