From 5ddf8de3691fde866c5a48b440cffa2990b2014c Mon Sep 17 00:00:00 2001 From: Debulois Date: Thu, 3 Feb 2022 13:02:21 +0100 Subject: Initial commit --- Wrapper/Functions/func_register.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Wrapper/Functions/func_register.php (limited to 'Wrapper/Functions/func_register.php') diff --git a/Wrapper/Functions/func_register.php b/Wrapper/Functions/func_register.php new file mode 100644 index 0000000..99741a3 --- /dev/null +++ b/Wrapper/Functions/func_register.php @@ -0,0 +1,24 @@ +add_user($email, + $password, + $is_admin, + $is_user, + $is_consultant + ); + // Sélection du message à afficher en fonction de la réussite de l'inscription. + if ($registered) { + $messageNumber = 10; + } else { + $messageNumber = 11; + } + // Redirection vers message avec l'index du message à afficher. + $_SESSION["messageNumber"] = $messageNumber; + header("Location: /Views/message.php"); + die(); +} +?> \ No newline at end of file -- cgit v1.2.3