title: Inserting Date from form using PHP Mysql
body: <p>I can not seem to get the date to insert from my form into my data base. Please help!</p>
  
  <p>here is my form
      
  
  <pre><code>echo '
  
  &lt;h1&gt;Enter New Report&lt;/h1&gt;
  &lt;form action="submitreport.php" method="post"
  enctype="multipart/form-data"&gt;
  
   Date: &lt;input type="text" name="Date" value='.$myDate.' /&gt;&lt;br /&gt;
   Report:&lt;br&gt;&lt;TEXTAREA NAME=Report ROWS=4 COLS=40&gt;&lt;/TEXTAREA&gt;&lt;br /&gt;
   &lt;input type="submit" name="submit" value="Submit" /&gt;
   &lt;/form&gt;
  
   ';
   ?&gt; 
  </code></pre>
  
  <p>Here is what I have written to submit it to the database 
      
  
  <pre><code>$insertdate = trim($_POST['Date']);
  
  $insertdate = mysql_real_escape_string($insertdate);
      $insertdate = date('m/d/Y', $insertdate);
  
  echo $insertdate;
  
  
  mysql_query("INSERT INTO `Reports`(`Date`, `Report`) VALUES ('$insertdate','$_POST[Report]')") or die("load1 -" .  mysql_error());
  
  
  mysql_close();
  
  echo "Thank You!" . " -" . "&lt;a href='index.php' style='text-decoration:none;color:#ff0099;'&gt; Return Home&lt;/a&gt;";
  ?&gt;
  </code></pre>