チャット

This commit is contained in:
2023-07-02 14:58:25 +09:00
parent 69194b550a
commit 8f615db95a
4 changed files with 41 additions and 45 deletions
+12 -4
View File
@@ -1,5 +1,8 @@
<?php
require_once './db_connection.php';
require_once './modules/user.mod.php';
require_once './modules/chat.mod.php';
@@ -7,10 +10,15 @@ $user_id = $_GET['id'];
$pass = $_GET['pass'];
$chat_message = $_GET['text'];
$user = User :: find ($user_id);
if ($user -> pass === $pass)
{
$chat = new Chat;
$chat = new Chat;
$chat -> user_id = $user_id;
$chat -> text = $chat_message;
$chat -> insert ();
$chat -> user_id = $user_id;
$chat -> text = $chat_message;
$chat -> insert ();
}