Q:

Trying to display data from two tables

I am trying to $_GET data from one table based on the id found in the other table. My first table is called user_thoughts, this table holds the data off all the public posts users make on my "social media website". I have another table called users which, stores all the details of the registered users for the site. 
I am trying to display all the user_thoughts on the homepage of the website, but I am struggling to display the correct data for the author of the "thought".
The idea is to get the added_by (author) of the user_thought then using the variable holding the value of added_by and comparing it to the username found in table users.
Here are my table's and it's fields:
user_thoughts:
id
message
date_of_msg_post
time_of_msg_post
attachment
added_by

users (Just displaying the relevant fields)
id
first_name
last_name
username
profile_pic

Aim:Get the added_by of the post from user_thoughts, then use added_by to get the added_by's details from the username field in table users. Note: added_by and username both will hold the same value.
Here is what I have tried:
/* How it works: The id of each user_thought will be used to determine which user posted it. 
 * Then display their details accourdingly.
 */
$get_thoughts_from_db = mysqli_query($connect, "SELECT * FROM user_thoughts ORDER BY id DESC"); // newest posts first

while ($row = mysqli_fetch_assoc($get_thoughts_from_db)) {
    $thought_id      = $row['id'];
    $msg_content     = $row['message'];
    $date_of_msg     = $row['date_of_msg_post'];
    $thoughts_by     = $row['added_by'];
    $time_of_msg     = $row['time_of_msg_post'];
    $attachent       = $row['attachment'];
    $get_user        = $_GET['id'];
} // while closed   

    // Get the details of the user based on the ID of the user thought.
    $get_data = mysqli_query($connect, "SELECT * FROM users WHERE id = '$get_user'");                                   
    $get_user_data = mysqli_fetch_assoc($get_data);
        $author_fname = $get_user_data['first_name'];
        $user_profile_dp = $get_user_data['profile_pic'];

// displaying all the posts in the database on the main page.
// Will limit 15 posts per page, and will order them by the date and time posted (latest posts first)
$get_all_posts_q = mysqli_query ($connect, "SELECT * FROM user_thoughts ORDER BY id DESC ");
    $check_rows = mysqli_num_rows($get_all_posts_q);
    while ($get_row = mysqli_fetch_array($get_all_posts_q)){
        $message         = $get_row['message']; 

        /**** Between the while loop is where I echo the div(s)
                     which display the above details. *******/

}

Current behavior:
At the moment, with the code above, it displays all the user_thoughts, i.e. there are three rows in the table, and each one is being displayed, however, the details along it are not based on the author of those posts. For example, the profile_pic of the user who wrote the author is not displaying. 

A:

This links the users and the user_thoughts. Remember to sanitize your inputs.
$get_thoughts_from_db = mysqli_query($connect, "SELECT * FROM user_thoughts INNER JOIN users ON user_thoughts.added_by = users.username ON ORDER BY id DESC"); // newest posts first

