<?php
header('Content-Type: text/plain; charset=utf-8');
require_once 'config/database.php';

try {
    // Selectionner NomPrenom où Date_Depot est NULL
    $stmt = $pdo->query("SELECT NomPrenom FROM cahier_des_charges WHERE Date_Depot IS NULL ORDER BY NomPrenom ASC");
    $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);

    if (count($rows) > 0) {
        foreach ($rows as $row) {
            echo $row['NomPrenom'] . "|";
        }
    } else {
        echo "NONE";
    }
} catch (PDOException $e) {
    die("ERR|Erreur SQL: " . $e->getMessage());
}
?>