From 6db8655fecb0a53d1ddcdc208b2136a56526f337 Mon Sep 17 00:00:00 2001 From: lopar Date: Sat, 24 Mar 2018 00:04:55 +0200 Subject: [PATCH] game chat send msg --- chat.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chat.php b/chat.php index ced889f..154af4f 100644 --- a/chat.php +++ b/chat.php @@ -12,9 +12,9 @@ if ($_SESSION['uid'] == null) { include_once "config.php"; //include_once "functions.php"; -//$msg = filter_input(INPUT_POST,'msg'); -//$uid = $_SESSION['uid']; -//if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg); +$msg = filter_input(INPUT_POST,'msg'); +$uid = $_SESSION['uid']; +if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg); function show_messages() {