<?php

include 'load.php';

if(isset($_POST['customer'])){
    $val = array();
    $customer = $_POST['customer'];
    $cashamount = $_POST['cashamount'];
    $cashamounthidden = $_POST['cashamounthidden'];
    $remain  = $cashamounthidden - $cashamount;
    $cusinfo = mysqli_fetch_array(mysqli_query($conn, "SELECT * FROM mobilecustomers WHERE coid='$customer'"));

    $ccredit = $cusinfo['ccredit'];
    $credit_limit = $cusinfo['credit_limit'];

    array_push($val,$ccredit,$remain+$ccredit);

    echo json_encode($val);
    
}


?>