function getGameById($id) { $db = getConnection(); $request = $db->prepare("SELECT * FROM `t_jeux` WHERE id_Jeux = " . $id); $request->execute(); $tab = $request->fetchAll(PDO::FETCH_ASSOC); if ($tab != null) { $consoles = getConsoleByGame($tab[0]['id_Jeux']); displayDetailGame($tab, $consoles[0]['nom_Console']); } else { return false; } }
/* * Page : inscription.php * Description : This page is the page where the users can register themselves. * Authors : Chauche Benoit & Boccard Nicolas * Date : 01.12.2015 * Version : 1.0 */ //Insersion du fichier de fonction include_once "../functions/dbFunctions.php"; if ($_SESSION["idLogged"] == "") { header('Location: index.php'); } $id = $_REQUEST['id']; $tab = modifyGame($id); $console = getConsoleByGame($tab[0]['id_Jeux']); if (isset($_REQUEST["discard"])) { header('Location: gestionmesjeux.php'); } //Définition du nom de la page $titlePage = "Gestion de mes jeux"; //Insersion du header HTML include_once "../view/HeadPage.php"; ?> <section id="SectionPage"> <header> Modifier un jeu </header> <form enctype="multipart/form-data" method="POST" action="#"> <table> <tr>