You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(($_SESSION["id"] == $u1 || $_SESSION["id"] == $u2) && mysqli_num_rows(mysqli_query($link,"SELECT id FROM users where id = ".$u1." OR id = ".$u2)) == 2){
$dbspec = "_".min($u1,$u2)."_".max($u1,$u2);
}
}
// echo $id_;
$result = mysqli_query($link,"SELECT username,message,sent_at,edited FROM messages".$dbspec." where id = ".$id_);
$row = mysqli_fetch_row($result);
$out = new \stdClass();
$out->username = $row[0]; // out.username = ...
$out->message = $row[1];
$out->sent_at = $row[2];
$out->edited = $row[3];
// echo "SELECT message_color FROM users where username = '".$row[0]."'";
$result_ = mysqli_query($link,"SELECT message_color,id FROM users where username = '".$row[0]."'");