<?php
include("../include/config.php");
require_once "../include/Database_functions.php";
$sqlObj=new sqlclass();
$tot=$_REQUEST['tot'];
$billno=$_REQUEST['billno'];
$val=$_REQUEST['val'];
$bal=$tot-$val;
$sql=mysql_query("update tbl_bill_amnt set recieved_amnt='".$val."',pending_amnt='".$bal."' where bill_no='".$billno."'");
echo $bal;
?>
