php how to save the day , month and year enter by user in variables to show value in database : <p>User enter the date , month and year and then press a button to show him the value of database based on the day he picked but I do not know how to save the day , month and year in $d , $m and $y variables</p>

<pre><code>&lt;style&gt;
.button {border-radius: 8px;} 
.button1 {font-size: 20px;}
&lt;/style&gt;
&lt;form&gt;

اليوم : &lt;input id="txtDay" type="text" placeholder="DD" /&gt;

الشهر : &lt;input id="txtMonth" type="text" placeholder="MM" /&gt;

السنة : &lt;input id="txtYear" type="text" placeholder="YYYY" /&gt;

&lt;button id="but" onclick="daily()"&gt;إظهار الإستهلاك اليومي&lt;/button&gt;

&lt;/form&gt;

&lt;script&gt;// &lt;![CDATA[
// to show the right value from database
  function daily() {

  $current_user=get_current_user_id();// to fetch the right data for the right user

  // takes the values ​​entered by the user
global $wpdb;
$d=???????????//define variable to store the day enter by user 
$m=???????????//define variable to store the month enter by user 
$y=???????????//define variable to store the year enter by user 
$daily_amount= $wpdb-&gt;get_var("SELECT daily_amount FROM arduino_period_use where ID=$current_user and day=$d and month=$m and year=$y ");
print_r($daily_amount); 
}
// ]]&gt;&lt;/script
</code></pre>
