Example #1
0
function checkMessage($time, $userID)
{
    $Db = new Database();
    $Db->connect('localhost', 'mvc', 'root', 'joakim1');
    $Db->txtChat();
    if ($Db->checkChat($time, $userID) >= 1) {
        // show updates
        echo "id: {$userID}\n";
        echo "data: Update\n\n";
    } else {
        echo "Hi";
    }
    ob_flush();
    flush();
}