Created
January 28, 2018 15:13
-
-
Save anonymous/de57b16b93f3ff1cbab0d779ac76f62a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$user_id = $_SESSION['user']['id']; | |
$STH = $pdo->query ( "SELECT * FROM dialog WHERE recive = $user_id OR send = $user_id ORDER by id DESC" ); | |
$STH->setFetchMode ( PDO::FETCH_OBJ ); | |
$row = $STH->fetch (); | |
$us_log1 = $row->send; | |
$us_log2 = $row->recive; | |
if ($us_log2 == $user_id) ($us_log2 = $us_log1); | |
$STH = $pdo->query ( "SELECT `login` FROM `users` WHERE `id` = $us_log1" ) | |
;$STH->setFetchMode ( PDO::FETCH_OBJ ); | |
$row1212121 = $STH->fetch(); | |
$us_looog = $row1212121->login; | |
$STH = $pdo->query ( "SELECT * FROM dialog WHERE recive = $user_id OR send = $user_id ORDER by id DESC" ); | |
$STH->setFetchMode ( PDO::FETCH_OBJ ); | |
while ($row = $STH->fetch ()) { | |
?> | |
<div class="dialogi"> | |
<div id="123"><?=$us_looog?></b></div> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment