fixed redirect and error message on add_user dialog
This commit is contained in:
@@ -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 @@
|
||||
</div>
|
||||
<div>
|
||||
<form method="post">
|
||||
<label><?php echo $error ?></label><br>
|
||||
<label for="user_name">Benutzername</label>
|
||||
<input type="text" name="user_name"/><br>
|
||||
<label for="password">Passwort</label>
|
||||
|
||||
Reference in New Issue
Block a user