????

Your IP : 216.73.216.34


Current Path : /home/carpe/www/Formulaire_Jours_Féries/
Upload File :
Current File : /home/carpe/www/Formulaire_Jours_Féries/save.php

<?php
if($_SERVER['REQUEST_METHOD'] === 'POST') {
    $nomMagasin = trim($_POST['nomMagasin'] ?? '');
    $horaires = $_POST['horaires'] ?? [];

    if(!$nomMagasin){
        echo "Le nom du magasin est requis.";
        exit;
    }

    // Pour l'exemple, on va juste retourner un récap
    echo "Horaires enregistrés pour le magasin <b>$nomMagasin</b> :<br>";
    echo "<ul>";
    foreach($horaires as $date => $horaire){
        $h = trim($horaire);
        if($h){
            echo "<li>$date : $h</li>";
        } else {
            echo "<li>$date : non renseigné</li>";
        }
    }
    echo "</ul>";
} else {
    echo "Méthode invalide.";
}