<?php require_once "../config/config_db.php"; require_once CONFIG_DIR . "/config_base.php"; require_once INC_DIR . "/autoload.function.php"; $page = new WebPage("Validation Achat des Billets"); $page->appendCssUrl("../css/index.css"); $matchs = array(); $types = array(); $quantites = array(); // var_dump($_POST); $requeteMatchs = Connection_DB::getInstance()->prepare('SELECT DATE_FORMAT(day, "%d-%m-%Y") AS day FROM infs3_prj13.Creneau, infs3_prj13.Match WHERE Match.id_creneau=Creneau.id_creneau AND Match.id_match=?'); $requeteTypes = Connection_DB::getInstance()->prepare('SELECT libTypeBillet FROM infs3_prj13.TypeBillet WHERE id_typeBillet = ?'); $requetePrix = Connection_DB::getInstance()->prepare('SELECT prixBillet AS prix FROM infs3_prj13.Disponibilite WHERE id_match=? AND id_typeBillet=?'); foreach ($_POST as $key => $value) { if (preg_match('#match#', $key) === 1) { $match = $value; } else { if (preg_match('#type#', $key) === 1) { array_push($types, [$match, $value]); } else { if (preg_match('#quantite#', $key) === 1) { if (!empty($_POST[$key])) {