<?php 
include "ChatConfig.php";
$query_chat_qws = $connection->prepare(
                            "SELECT * FROM group_$_POST[number] WHERE id=:id"
                        );
                        $query_chat_qws->bindParam(
                            "id",
                            $_POST["replay"],
                            PDO::PARAM_STR
                        );
                        $query_chat_qws->execute();
                        $result_chat_user_ws = $query_chat_qws->fetch(PDO::FETCH_ASSOC);
                        
                        $query_chat_qwsd = $connection->prepare(
                            "SELECT * FROM users WHERE username=:username"
                        );
                        $query_chat_qwsd->bindParam(
                            "username",
                            $result_chat_user_ws["username"],
                            PDO::PARAM_STR
                        );
                        $query_chat_qwsd->execute();
                        $result_chat_user_wsd = $query_chat_qwsd->fetch(PDO::FETCH_ASSOC);
                        echo  $result_chat_user_wsd["name"] . ': "'. $result_chat_user_ws["message"] . '"';