|
123456789101112131415161718192021222324 |
- <?php
-
- require_once './db_connection.php';
-
- require_once './modules/user.mod.php';
- require_once './modules/chat.mod.php';
-
-
- $user_id = $_GET['id'];
- $pass = $_GET['pass'];
- $chat_message = $_GET['text'];
-
- $user = User :: find ($user_id);
-
- if ($user -> pass === $pass)
- {
- $chat = new Chat;
-
- $chat -> user_id = $user_id;
- $chat -> text = $chat_message;
-
- $chat -> insert ();
- }
-
|