<?php 
require 'db.php';
$data = json_decode(file_get_contents('php://input'), true);
if($data['mobile'] == '' || $data['shop_id'] == '')
{
    $returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went Wrong!");
}
else
{
    $shop_id = strip_tags(mysqli_real_escape_string($con,$data['shop_id']));
    $shop_code = strip_tags(mysqli_real_escape_string($con,$data['shop_code']));
    $mobile = strip_tags(mysqli_real_escape_string($con,$data['mobile']));
    
    $search = $con->query("select * from user where mobile='$mobile' and shop_id = '$shop_id' and shop_code = '$shop_code'");
    if($search->num_rows != 0)
    {
        
        $returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"OTP Send Successfully!");
    }
    else
    {
        $returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Mobile Number Not Registered!");
    }
}
echo json_encode($returnArr);
?>