title: PHP / MYSQL Date will not insert
body: <p>I am trying to insert a date from a variable into a mysql database. The format of the column is date and it has dates in the column. The dates in the column look like yyyy-mm-dd</p>
  
  <p>my date variable also looks like this however it will not insert the date into the column and even i do not get an error just a white screen.</p>
  
  <pre><code>&lt;?php
  //here is the code to insert this does not work
  mysql_query("INSERT INTO `invoices` (account_id, purchased_date, sales_rep, INV_ID)
  VALUES ('".$acctid."', '".$date"','".$row['8']."', '".$invid."' )") or die("load1 -" . mysql_error());
  </code></pre>
  
  <p><br></p>
  
  <pre><code>&lt;?php 
  //this does work but it does not have the date.
  mysql_query("INSERT INTO `invoices` (account_id, sales_rep, INV_ID)
      VALUES ('".$acctid."', '".$row['8']."', '".$invid."')") or die("load1 -" . mysql_error());
  </code></pre>
  
  <p>not sure what the problem is. I have displayed the $date variable onto the screen and it looks fine ex. 2012-06-01 </p>
  
  <p>so I am not sure why it can not insert this into the database.</p>