fixed edit note

This commit is contained in:
Felix Ivo
2025-06-30 10:10:42 +02:00
parent 5eb3e30114
commit fc17a1a312
2 changed files with 7 additions and 2 deletions

View File

@@ -71,7 +71,12 @@ class NotesController
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Process form submission
$noteId = $_GET['id'];
$note = $this->notesModel->editNote($noteId, $_POST['title'], $_POST['content'], $_SESSION['user_id']);
$note = $this->notesModel->editNote(
$noteId,
$_POST['title'],
$_POST['content'],
$_SESSION['user_id']
);
if ($note) {
// Redirect to show notes page after successful creation