session_start();
$musteriid = $_SESSION['musteriid'];
$tarih1 = date('01-m-Y');
$tarih2 = date('d-m-Y');
$tarih1db = date('Y-m-d',strtotime($tarih1));
$tarih2db = date('Y-m-d',strtotime($tarih2));
$sql = "select * from faturalar where cariid = $musteriid and geneltoplam <> 0 and tarih BETWEEN '$tarih1db' AND '$tarih2db' order by id desc";
?>