title: PHP / MYSQL Echo using the join command
body: <p>New to php but learning a lot. Relatively simple question that I believe uses the JOIN command.  In my code...</p>
  
  <p>This gets and prints out the current session user: </p>
  
  <pre><code>$userId = $_SESSION['user_id'];
  echo $userId;
  </code></pre>
  
  <p>But user_id is just a number in my members table, so that will print out "3" or some such. In the same members table, there is a column called 'username' where 3 (id column) is associated with 'Brad' (username column.)  </p>
  
  <p>What would the echo command be to get it to print Brad?  I tried something like</p>
  
  <pre><code>$actualname = mysqli_query($con,"SELECT members.username JOIN members on userid=members.id"); 
  
  echo $actualname;
  </code></pre>
  
  <p>I don't have a great sense for how the join command functions yet, any help would be great!</p>