<?php

function notify_user($user_id,$title,$message)
{
    $db = \App\Core\Database::getInstance();

    $db->prepare("INSERT INTO notifications(user_id,title,message) VALUES (?,?,?)")
       ->execute([$user_id,$title,$message]);

    // Email sending can be integrated here using PHPMailer
}
