This commit is contained in:
PBBFA23CKL committed 2025-07-07 14:39:42 +02:00
commit bb9424232c
8 files changed
+147 -10

No files matched your search

+4 -4
View File
@@ -79,15 +79,15 @@ class NotesController
$_SESSION['user_id'],
$_POST['priority']
);
if ($note) {
// Redirect to show notes page after successful creation
// Redirect to show notes page after successful update
header('Location: ?controller=Notes&page=showNotes&do=showNotes');
exit();
} else {
// If creation failed, show error message and stay on the form
// If update failed, show error message and stay on the form
$this->view->setVars([
'error' => 'Failed to create note. Please try again.'
'error' => 'Failed to update note. Please try again.'
]);
}
}