este es el código:
Código PHP:
if(isset($buscar)){
$dia=$_POST["dia"];
$mes=$_POST["mes"];
$ano=$_POST["ano"];
$dia2=$_POST["dia2"];
$mes2=$_POST["mes2"];
$ano2=$_POST["ano2"];
$desde=$ano."-".$mes."-".$dia;
$hasta=$ano2."-".$mes2."-".$dia2;
$string="select id,total,rut,modo_pago from boleta where fecha > '$desde' and fecha < '$hasta' order by id asc";
$resp=mysql_query($string,$link);