<?php include("../cn.php");
$car = $_REQUEST["car"];
$destination = $_REQUEST["destination"];
$pickup = $_REQUEST["pickup"];

if($pickup!="" && $destination!=""){
   $sql = mysqli_query($connect, "select * from routes where Car = '$car' and PickUp = '$pickup' and Destination = '$destination'");
    $data = mysqli_fetch_assoc($sql);
    
    if($data!=""){
        echo $data["Rate"];
    } else {
    
        echo 0;
    } 
}else{
    echo 0;
}




?>