<?php
    session_start();
    include 'config.php';
    $uid = $_SESSION['userid'];
    $uname = $_SESSION['uname'];
    $regime_type = $_SESSION['regime_type'];
    $cargo_channel = $_SESSION['cargo_channel'];   
    $searchTerm = $_POST['term'];

    //get matched data from countries table
    $sql_stmt = "SELECT code FROM country_master where description = '$searchTerm' ";
    // var_dump($sql_stmt);die;
    $result = mysqli_query($con,$sql_stmt);
    $row = $result->fetch_assoc();
    $data = $row['code'];


    echo $data;
?>