<?php

function createNotification($pdo, $userId, $title, $message, $type = "info")
{
    $stmt = $pdo->prepare("
        INSERT INTO notifications
        (
            user_id,
            title,
            message,
            type
        )
        VALUES
        (
            ?, ?, ?, ?
        )
    ");

    $stmt->execute([
        $userId,
        $title,
        $message,
        $type
    ]);
}