<?php
include_once "ChatConfig.php";
include_once "jdf.php";
$timsse = jdate("H:i, j F Y");
$count=$connection->prepare("update users set last_seen='$timsse' where username='$_POST[username]'");

$count->execute();
$stmt = $connection->query("SELECT message from remove where number='$_POST[group]'");
$result = $stmt->fetchAll(PDO::FETCH_OBJ);
$ids = array_map(function($v){
    return $v->message;
}, $result);

echo json_encode($ids);