Código PHP:
<?php
include('conexion.php');
$fin=date("d/m/Y", strtotime($_POST['date']));
$date=date("d/m/Y", strtotime($_POST['date2']));
$sql="select p.producto, ddv.cantidad,ddv.Precio_venta,dv.Fechave...from detalledocventa ddv, docventa dv,producto pwhere ddv.IdProducto=p.IdProducto and ddv.iddocventa=dv.iddocventa and Fechaventa between $fin and $date";
//echo $sql;
$res=mysql_query($sql);while($row=mysql_fetch_array($res)){
echo $row[0];echo "<tr><td>".$row[0]."</td><td>".$row[1]."...
}
?>
prueba asi....