Новое игровое окно.

This commit is contained in:
lopar
2018-03-22 21:32:48 +02:00
parent a28bb61c05
commit bff129f7b7
2 changed files with 87 additions and 9 deletions
+8 -9
View File
@@ -10,12 +10,11 @@ if ($_SESSION['uid'] == null) {
header("Location: index.php");
}
include_once "config.php";
include_once "functions.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()
{
@@ -42,8 +41,8 @@ function show_messages()
<div>
<?php show_messages(); ?>
</div>
<form action="chat.php" method="post">
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
<input type="submit" value="Отправить">
</form>
<!--<form action="chat.php" method="post">-->
<!-- <input id="msg" name="msg" size="100" placeholder="Введите сообщение...">-->
<!-- <input type="submit" value="Отправить">-->
<!--</form>-->
</body>