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 (