<?php 

require 'db.php';

if(isset($_GET['sid']) && isset($_GET['token']))
{
    $shop_id = $_GET['sid'];
    $shop_code = $_GET['token'];

    include 'token_check.php';
    
    if($token_check)
    {
        $sel = $con->query("select * from distance_db  where shop_id='$shop_id' and shop_code='$shop_code'");
        $i=1;
        while($row = $sel->fetch_assoc())
        {
            $myarray[] = $row;
        }
        echo json_encode($myarray);
    }
    else
    {
        $rows = array('status'=>"",'message' => 'Data Error');
        echo json_encode($rows);
    }
}

?>

