<?php
require_once 'connect.php';
        // opening db connection 
       
if(isset($_POST['user_id'])){
	$query = $_POST['user_id'];
	$pay_list = $_POST['pay_list'];
	$user_id1 = $_POST['user_id1'];
	$result = mysqli_query($conn,$query);
	$result_pay_list = mysqli_query($conn,$pay_list);
		$row1 = mysqli_fetch_array($result);
		$row_pay = mysqli_fetch_array($result_pay_list);
		
		echo $row1['amt'] - $row_pay['pay_amount'];	
      
}
if(isset($_POST['kyc_tbl'])){
	$query = $_POST['kyc_tbl'];
	$result = mysqli_query($conn,$query);
		$row = mysqli_fetch_array($result);
		if(mysqli_num_rows($result) > 0){
		echo "6";	
		}else{
		echo "18";
		}
      
}




?>