title: How to pass date input to php from form.It gives output as 1970-01-01
body: <p>Here  is an input form which passes date type to intermediate.php from a form.</p>
  <pre><code>&lt;form action=&quot;intermediate.php&quot; method=&quot;post&quot;&gt;
  &lt;input type=&quot;date&quot; name=&quot;vazhipadudate1&quot; /&gt;
  &lt;/form&gt;
  </code></pre>
  <p>How can i get the picked date i tried this code snippet .It echos as <code>1970-01-01</code></p>
  <p>Php code snippet.</p>
  <pre><code>$date='vazhipadudate1';
  $time = strtotime($_POST[&quot;$date&quot;]);
  $storecart[$i]['date'] = date('Y-m-d', $time);
  echo &quot;Selected Date is..........&quot;.$storecart[$i]['date'] ;
  </code></pre>
  <p>The output i am getting as</p>
  <p>Selected Date is..........1970-01-01</p>