title: Undefined index: user_name
body: <p>When I try to use the user_name from $_SESSION I get the error </p>
  
  <blockquote>
    <p>'Undefined index: user_name'</p>
  </blockquote>
  
  <p><strong>CODE:</strong></p>
  
  <pre><code>  $_SESSION['signed_in'] = true;
  
    while ($row = $query1-&gt;fetch(PDO::FETCH_ASSOC))
    {
      $_SESSION['user_id']    = $row['user_id'];
      $_SESSION['user_name']  = $row['user_first_name'];
    }
  
    echo 'Welcome, ' . $_SESSION['user_name'] . '. &lt;a href="index.php"&gt;Proceed to the overview page to see your tasks&lt;/a&gt;.';  
  </code></pre>