From 9b8db36ab9d42f4acbd8248b89e173cbf1439c5f Mon Sep 17 00:00:00 2001 From: kylian prebost Date: Mon, 1 Jun 2026 10:04:18 +0200 Subject: [PATCH] =?UTF-8?q?cr=C3=A9ation=20du=20controlleur=20pour=20la=20?= =?UTF-8?q?cr=C3=A9ation=20de=20compte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/utilisateur_ctrl.php | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 controllers/utilisateur_ctrl.php diff --git a/controllers/utilisateur_ctrl.php b/controllers/utilisateur_ctrl.php new file mode 100644 index 0000000..973e790 --- /dev/null +++ b/controllers/utilisateur_ctrl.php @@ -0,0 +1,42 @@ +Erreur : Le nom ou le login contient des caractère non autorisés."; + require('views/add_utilisateur_form_view.php'); + + } else { + + $mdp_hache = password_hash($mdp, PASSWORD_DEFAULT); + + create_utilisateur_crud($nom, $prenom, $role, $nomdep, $num_tel, $login, $mdp_hache); + + $_SESSION['notification'] = "Ajout du nouvel utilisateur réussi"; + + header('Location: index.php'); + exit(); + } + } +} +?> \ No newline at end of file