changed name
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once './modules/common.mod.php';
|
||||
require_once './modules/chat.mod.php';
|
||||
|
||||
|
||||
$db = new Chat;
|
||||
$chat = new Chat;
|
||||
|
||||
$user_id = $_POST['id'];
|
||||
$chat_message = $_POST['text'];
|
||||
|
||||
$db -> send_chat ($user_id, $chat_message);
|
||||
$chat -> send ($user_id, $chat_message);
|
||||
|
||||
|
||||
@@ -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
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user