* Project name: Battles-Game */ use Battles\Chat; use Battles\Database\Db; use Battles\Template; require_once "config.php"; $chat = new Chat(Db::getInstance()); if (!empty($_POST['msg'])) { $chat->addMessage($_POST['msg']); } Template::header('chat'); echo $chat->getMessages(); ?>