0) { while ($row = mysqli_fetch_assoc($query)) { ($row['img']) ? $img = $row['img'] : $img = "default.png"; if ($row['post_msg_id'] === $current_user) { $output .= '

' . $row['msg'] . '

'; } else { $output .= '

' . $row['msg'] . '

'; } } } else { $output .= '
Send a message to start conversation :)
'; } echo $output; } else { header("location: ../start.php"); } ?>