prepare('INSERT INTO notes (user_id, title, content, color, tags) VALUES (?, ?, ?, ?, ?)'); $stmt->execute([$user_id, $title, $content, $color, $tags]); header('Location: index.php?note_created=1'); exit; } catch (PDOException $e) { $error = 'Database error: ' . $e->getMessage(); } } } ?>