From 68f1e353eed4a01c236e605974cb7a0c022effbf Mon Sep 17 00:00:00 2001 From: Miteruzo Date: Fri, 30 Jun 2023 22:03:23 +0900 Subject: [PATCH] changed name --- chat.php | 6 +++--- modules/chat.mod.php | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/chat.php b/chat.php index 2bc6225..d0f97fc 100644 --- a/chat.php +++ b/chat.php @@ -1,12 +1,12 @@ send_chat ($user_id, $chat_message); +$chat -> send ($user_id, $chat_message); diff --git a/modules/chat.mod.php b/modules/chat.mod.php index 2e95da4..ff0520c 100644 --- a/modules/chat.mod.php +++ b/modules/chat.mod.php @@ -3,10 +3,11 @@ class Chat { - var $db; + private $db; function - __construct () + __construct (): + void { $config = include (__DIR__ . '/config.php'); @@ -28,7 +29,7 @@ Chat $sql = " INSERT INTO chats ( - id, + user_id, text) VALUES (