added create and eedit note functionality (flawed)
This commit is contained in:
1 parent
1e9705aa13
commit
24c8f38c4d
4 files changed
+50
-12
No files matched your search
@@ -46,10 +46,11 @@ class NotesController
|
||||
$_POST['content'],
|
||||
$_SESSION['user_id']
|
||||
);
|
||||
exit();
|
||||
|
||||
if ($note) {
|
||||
// Redirect to show notes page after successful creation
|
||||
header('Location: ?controller=Notes&page=showNotes');
|
||||
header('Location: ?controller=Notes&page=showNotes&do=showNotes');
|
||||
exit();
|
||||
} else {
|
||||
// If creation failed, show error message and stay on the form
|
||||
@@ -69,7 +70,7 @@ class NotesController
|
||||
|
||||
if ($note) {
|
||||
// Redirect to show notes page after successful creation
|
||||
header('Location: ?controller=Notes&page=showNotes');
|
||||
header('Location: ?controller=Notes&page=showNotes&do=showNotes');
|
||||
exit();
|
||||
} else {
|
||||
// If creation failed, show error message and stay on the form
|
||||
|
||||
Reference in new issue
Block a user