Куча мелких фиксов, уборка мусора.
This commit is contained in:
3
chat.php
3
chat.php
@@ -8,11 +8,12 @@
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once "config.php";
|
||||
//include_once "functions.php";
|
||||
|
||||
$msg = filter_input(INPUT_POST, 'msg');
|
||||
$msg = $_POST['msg'] ?? null;
|
||||
$uid = $_SESSION['uid'];
|
||||
if ($msg) {
|
||||
try { db::c()->query('INSERT INTO `chat` (`user_id`, `msg`) VALUES (?i, "?s")', $uid, $msg); }
|
||||
|
||||
Reference in New Issue
Block a user