<?php

	include("include/db.php");

//echo '<pre>';
//print_r($_REQUEST);
	
    $amount=$_REQUEST["amount"];
    $id=$_REQUEST['id'];
    $query="select * from wallet_balance where balance_user_id='$id'";
    $result=mysqli_query($conn,$query);
    $count=mysqli_num_rows($result);
    if($count >0)
    {
		while($rw=mysqli_fetch_array($result))
		{
			$balance=$rw['total_balance'];
			if($balance<$amount)
			{
			    echo '1';
			}
			else
			{
			    echo '2';
			}
		}
    }
	else
	{
		//echo '<span style="color: green">Email has available </span>';
		//return true;
		echo '3';
		//echo '<pre>';
		//print_r($conn);
	}
	
	
?>



 