<?php

session_start(); 
    $u_uname = '';
    if (isset($_COOKIE['auth_token']))
    {
        $u_uname = $_COOKIE['auth_token'];
    }else{
        header("location:../login.php");
    }

include '../include/pay_connection.php';
$json =array();
if(isset($_POST['user_id'])) {
   $user_id = $_POST['user_id'];
   $sql = "SELECT full_name FROM users WHERE user_id = '$user_id'";
 
$result = $selecter->query($sql);

if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
    $name = $row['full_name'];
    $json['status'] = true;
    $json['data'] = $name;
    $json['message'] = "Data found";
    echo json_encode($json);
    exit;
}else{
   $json['status'] = false;
    $json['message'] = "Data not  found";
     echo json_encode($json);
    exit;
}

}else{
     $json['status'] = false;
    $json['message'] = "Parameter missing";
     echo json_encode($json);
    exit;
}


?>