<?php
if(isset($_POST["actionv"]))
{
    include('includes/config.php');
    $outputs = '';
    
    if($_POST["actionv"] == "vehicle")
    {
        $vendors = $_POST["vendor"]; // Fetch 'vendor' from the AJAX request
        $querys = "SELECT * FROM `measurements` as m WHERE m.vehicle_id = '".$_POST["query"]."' AND m.vendor_id='".$vendors."' AND m.md_status='0'";
        $resultss = mysqli_query($con, $querys);
        while($rows = mysqli_fetch_array($resultss))
        {
            $outputs .= '<option value="'.$rows["vmeasurement"].'">'.$rows["vmeasurement"].'</option>';
        }
    }
    
    echo $outputs;
}
?>
