diff --git a/app/public/add_user.php b/app/public/add_user.php index f78e02a..38350e2 100644 --- a/app/public/add_user.php +++ b/app/public/add_user.php @@ -3,6 +3,7 @@ include("../scripts/connection.php"); include("../scripts/functions.php"); $user_data = check_admin($con); + $error = null; if($_SERVER['REQUEST_METHOD'] == "POST") { $user_name = $_POST['user_name']; @@ -18,8 +19,10 @@ } else { write_user($con, $user_name, $user_id, $phash, $salt, $user_group, NULL); } + header("Location: manage_user.php"); + die; } else { - echo "Bitte Benutzername und Passwort eintragen!"; + $error = "Bitte Benutzername und Passwort eintragen!"; } } @@ -32,6 +35,7 @@
+