1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| // if ($_POST['matricule'] == $donnees['matricule']) {
// $req = $bdd->prepare('INSERT INTO reservation (id_user, date_reservation, commentaire, date_debut, date_fin) VALUES(?, NOW(), ?, STR_TO_DATE(?, "%d/%m/%Y"), STR_TO_DATE(?, "%d/%m/%Y"))');
// $req->execute(array($_POST['id_user'], $_POST['commentaire'], $_POST['date_debut'], $_POST['date_fin']));
// $req = $bdd->prepare('INSERT INTO repas (id_reservation, menu_mardi, menu_mercredi, menu_jeudi, menu_vendredi, menu_samedi, menu_dimanche, menu_lundi) VALUES(LAST_INSERT_ID(), ?, ?, ?, ?, ?, ?, ?)');
// $req->execute(array($_POST['menu_mardi'], $_POST['menu_mercredi'], $_POST['menu_jeudi'], $_POST['menu_vendredi'], $_POST['menu_samedi'], $_POST['menu_dimanche'], $_POST['menu_lundi']));
// header('Location: index.php');
// }
// else {
// echo"Le matricule est incorrect ou ne correspond pas avec le nom selectionné";
// header('Location: index.php');
// }
} |
Partager