What are the values you're getting from $_POST? Unless they correspond exactly to a mysql standard date/time string, e.g.
Then you cannot directly stuff those $_POSt values into your query without appropriate translation logic.
... WHERE DATE(time) BETWEEN 'Jan 31' and 'Feb 28'
is not a valid comparison, but
... WHERE DATE(TIME) BETWEEN '2013-01-31' and '2013-02-28'