From 84dcc75a1b0e8ad05dc411e82b0e9fcc13f5a343 Mon Sep 17 00:00:00 2001 From: nicrausaz <n.crausaz99@gmail.com> Date: Tue, 11 Dec 2018 11:06:52 +0100 Subject: [PATCH] working --- canapEPFL/configs/db.template.php | 4 ++++ canapEPFL/helpers.php | 1 + 2 files changed, 5 insertions(+) diff --git a/canapEPFL/configs/db.template.php b/canapEPFL/configs/db.template.php index f5a297d..a6ea9bf 100644 --- a/canapEPFL/configs/db.template.php +++ b/canapEPFL/configs/db.template.php @@ -3,4 +3,8 @@ $db_user = ''; $db_pass = ''; $pdo = new PDO('mysql:host=localhost;dbname=canap_dev', $db_user, $db_pass); + $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); + + // for dev + // $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); ?> \ No newline at end of file diff --git a/canapEPFL/helpers.php b/canapEPFL/helpers.php index f4edc19..afef05d 100644 --- a/canapEPFL/helpers.php +++ b/canapEPFL/helpers.php @@ -337,6 +337,7 @@ function deletePostulation ($pdo, $id, $sciper, $rep1, $rep2) { $query->execute(); // TODO: Delete files on server ? + header('Location: viewpostulation.php'); } #endregion ?> \ No newline at end of file -- GitLab