<?php
 
if( isset($_POST["descrip"]) && isset($_POST["user"])  && isset($_POST["tprice"])  && isset($_POST["sdate"]))
{ 
    
    $descrip= $_POST['descrip'];
    $tPrice= $_POST['tprice']; 
    $user= $_POST['user'];    
    $sdate= $_POST['sdate']; 
    require_once"labClass.php";
    $con=new labClass(); 
    $rQc= $con->othersourceentryrec($descrip,$user,$tPrice,$sdate);
    if($rQc->rowCount()>0)
    {
        $recID=2;
        $r= $con->getBalance($recID)->fetch();
        $bal=$r['cbalance']+$tPrice; 
        $u= $con->updateBalance($recID,$bal);
    }
    
    ?>
   <h6 class="text-success">Save!..</h6>
         <?php
      require_once"othersourcemoney.php";
   }
   else{
       echo "All field required!.";
   }
   //echo "2.finish";
?>