title: how to count number of days between two dates and display the result in a textbox in php
body: <pre><code>&lt;li&gt;Date From *&lt;br /&gt;
    &lt;input type="text" name="date_from" id="date_from" value="&lt;?=gf_dateformat($date_from,'Y-m-d') ?&gt;" onclick="javascript: displayDatePicker('date_from', false, 'dmy', '-');" style="width:100px;" /&gt;
  &lt;/li&gt;
  &lt;li&gt;Date TO *&lt;br /&gt;
    &lt;input type="text" name="date_to" id="date_to" value="&lt;?=gf_dateformat($date_to,'Y-m-d') ?&gt;" onclick="javascript: displayDatePicker('date_to', false, 'dmy', '-');" style="width:100px;" onblur="" /&gt; 
  &lt;/li&gt;                   
  &lt;li&gt;No of Days &lt;br /&gt;
    &lt;input type="text" name="num_days" id="num_days" required="yes" validate='text'  title="Enter Number of Days"/&gt;
  &lt;/li&gt;
  </code></pre>