<?php 
  include_once '../php/config.php';
   $sqlFacturas = mysql_query("select sum(balance) as total from ventas where id_venta<= '".$_GET['id']."' and balance>0 and cliente='".$_GET['cliente']."'") or die(mysql_error());
   echo mysql_result($sqlFacturas,0,"total");
 
?>
