title: How to pass along specific SESSION information from one php page to another?
body: <p>I have trouble to figure out a php problem described below.</p>
  
  <p>I have one PHP page that lists several users in a table (the list is generated by PHP). Next to every user, there is a "remove" button. By clicking this button, the page will redirect to a new removal confirmation page, and therefore we need to pass along information about the specifically chosen user.</p>
  
  <p>My idea was to use a $_SESSION array that stores all the information about the chosen user (e.g. first, last name, user ID etc.), but I cannot figure out how the array should store the information for one specific user. Right now I'm using a while loop to generate the list of users:</p>
  
  <pre><code>      while ($row = mysqli_fetch_array($data)) { 
    // Display the user data
    echo '&lt;td&gt;&lt;strong&gt;' . $row['first_name'] . '&lt;/strong&gt;&lt;/td&gt;';
    echo '&lt;td&gt;&lt;strong&gt;' . $row['last_name'] . '&lt;/strong&gt;&lt;/td&gt;';
    echo '&lt;td&gt;' . $row['nickname'] . '&lt;/td&gt;';
    ...
  
    echo '&lt;td&gt;&lt;a href="remove.php"&gt;Remove&lt;/a&gt;'; // button should be here
    echo '&lt;/td&gt;&lt;/tr&gt;';
    }
   echo '&lt;/table&gt;';
  </code></pre>
  
  <p>How should I make sure that THAT particular Remove link fills the $_SESSION array with that user's information? Right now, the while loop only creates a bunch of identical remove buttons that do not differentiate between the different users listed in the table. Any help is appreciated!</p>