enter image description here how i can calculate the total sum between particular date (eg: 2016/06/16 to 2016 enter image description here/08/17). and which the date will be choose by the user from front end. I have tried something like this.
$sql = "select sum(amount_no) from tsurphus where subDate BETWEEN '2016-03-01' AND '2016-08-05'";
$q = mysql_query($sql);
$row = mysql_fetch_array($q);
echo 'Current Total Amount. Rs: ' . $row[0];
But here the problem is that to calculate the total amount i need to change the date from code. please help.. thank in advance.