<?php
include("../../db.php");

$driverId = $_GET['driver_id'];

$message = "Unknown Error";
$status = 0;

$dataBody = new StdClass();

if($driverId != ''){
    $result = $db->getRow("select * from gps_tracking where driver_id='$driverId'");
    if($result){
        $status   =  1;
        $dataBody =  $result;
        $message  =  "Success";
    }else{
        $message = "Location not found for selected bus!";
    }
}else{
    $message = "Driver id required!";
}

echo json_encode(array("status"=>$status,"data"=>$dataBody,"message"=>$message));