<?php

include('db_details.php');

$id = intval($_GET['id'] ?? 0);

$stmt = $db->prepare("SELECT status FROM info WHERE id = :id LIMIT 1");

$stmt->execute([
    ':id' => $id
]);

$row = $stmt->fetch(PDO::FETCH_ASSOC);

if($row){

    echo json_encode([
        'status' => $row['status']
    ]);

}else{

    echo json_encode([
        'status' => 'not_found'
    ]);

}