user_name = $_POST["newUsername"]; $admin->password = $_POST["newPassword"]; if ($admin->save()){ header("location: ../../../Frontend/Html/AdminPage.html?success=adminUserWasCreated"); exit(); }else{ header("location: ../../../Frontend/Html/AdminPage.html?error=errorWhileSaving"); exit(); } }else{ header("location: ../../../Frontend/Html/AdminPage.html?error=input:newAdmin.notSet"); exit(); } }else{ header("location: ../../../Frontend/index.html?error=isNotAdministrator"); exit(); }