<?php
include "configa.php";  // ডেটাবেস কানেকশন

$id_no = $_POST['id_no'] ?? '';

$response = ["success" => false];

if(!empty($id_no)){
    $query = mysqli_query($conn, "SELECT * FROM seller WHERE id_no = '".mysqli_real_escape_string($conn, $id_no)."' LIMIT 1");
    if(mysqli_num_rows($query) > 0){
        $row = mysqli_fetch_assoc($query);
        $response = [
            "success" => true,
            "data" => $row
        ];
    }
}

header('Content-Type: application/json');
echo json_encode($response);
?>