<?php
session_start();
include '../conexion.php';

$iduniforme = $_POST['iduniforme'];
$sql = $connection->query("SELECT * FROM datos_uniformes WHERE iduniforme = '$iduniforme'");

$response = array();

if ($sql->num_rows > 0) {
    while ($data = $sql->fetch_assoc()) {
        $response['success'] = true;
        $response['uniforme'] = $data['descrip']; // Ajusta según tu estructura de datos
        $response['inv1']=$data['inv1'];
        $response['inv2']=$data['inv2'];
        $response['inv3']=$data['inv3'];
    }
} else {
    $response['success'] = false;
}

echo json_encode($response);
?>