fetch(); include("header_footer/header.php"); } if($_SERVER['REQUEST_METHOD'] == "POST") { $id = sanitize_input($_POST['id']); $user = get_user($con, $id)->fetch(); $user_group = sanitize_input($_POST['user_group']); $user_name = sanitize_input($_POST['user_name']); $bind_station = sanitize_input($_POST['bind_station']); $password = sanitize_input($_POST['password']); if($user['user_name'] != $user_name) { change_user_name($con, $id, $user_name); } if($user['user_group'] != $user_group) { if($user_group == "station") { change_user_group($con, $id, $user_group, $bind_station); } else { change_user_group($con, $id, $user_group, NULL); } } if($user['s_id'] != $bind_station) { if ($user_group == "station") { change_s_id($con, $id, $bind_station); } } if(!empty($password)) { $phash = generate_password_hash($password, $user['salt']); change_password($con, $id, $phash); } header("Location: manage_user.php"); die; } ?>

Benutzer bearbeiten

required/>
name="id"/>