diff --git a/enter.php b/enter.php index 2af375b..7ac6a97 100644 --- a/enter.php +++ b/enter.php @@ -48,7 +48,7 @@ if ($username && $password) { $sms = db::c()->query('SELECT * FROM `telegraph` WHERE `receiver` = ?i', $data['id']); while ($res = $sms->fetch_assoc()) { - db::c()->query('INSERT INTO `chat` (`uid`, `msg`, `type`) VALUES (?i, "?s", "?s")', $uid, $msg, 'sms'); + db::c()->query('INSERT INTO `chat` (`touid`, `msg`, `type`) VALUES (?i, "?s", "?s")', $res['receiver'], $res['msg'], 'sms'); } db::c()->query('DELETE FROM `telegraph` WHERE `receiver` = ?i', $data['id']); header("Location: fight.php");