Store a values from HTML input into a php variable using javascript : <pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="content-type" content="text/html" /&gt;
    &lt;meta name="author" content="gencyolcu" /&gt;

    &lt;title&gt;Untitled 8&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

   Date:&lt;br /&gt;
  &lt;input type="date" id="sdate"/&gt;&lt;br /&gt;
 &lt;button onclick="fun()"&gt;Click me&lt;/button&gt;

&lt;script&gt;

var js_x =document.getElementById('sdate');

&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;?php
 echo $php_x;
?&gt;
</code></pre>

<p>I want to use the date to fetch data using php.
How can I store the value I get from the date input tag in the php variable ?</p>
