<?php 
require 'db.php';
$data = json_decode(file_get_contents('php://input'), true);
if($data['mobile'] == '')
{
    $returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went Wrong!");
}
else
{
    $mobile = $data['mobile'];
    $sql = "select * from shop_details where (owner_mobile='$mobile' or manager_mobile = '$mobile') and status = '1'";
    $search1 = $con->query($sql)->num_rows;
    
    if($search1 == 0)
    {
        $returnArr = array("ResponseCode"=>$sql,"Result"=>"false","ResponseMsg"=>"You're Not a Merchant!");
    }
    else
    {
      $returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"OTP Sent Successfully!");
    }
}
echo json_encode($returnArr);
?>