user_name = $_POST["newUsername"]; $admin->password = $_POST["newPassword"]; if ($admin->save()){ http_response_code(201); }else{ http_response_code(500); } }else{ http_response_code(400); } }else{ http_response_code(401); }