<?php
include 'conexao.php';

if (isset($_POST['aluno_id'])) {
    $id = $_POST['aluno_id'];
    $stmt = $conn->prepare("SELECT * FROM alunos WHERE id = ?");
    $stmt->bind_param("i", $id);
    $stmt->execute();
    $result = $stmt->get_result();
    $aluno = $result->fetch_assoc();

    echo json_encode($aluno);
}
