title: Differentiate between multiple buttons on a table. html php
body: <p>I am creating an edit edit/delete user table and have created an 'edit' button for each record populated in the table. I want to do several things. 
  1. when an edit button is pressed for a specific user, open a new page called "EDIT."
  2. populate form controls in the "EDIT" page with the corresponding user information for the specific 'edit' button that was pressed.</p>
  
  <p>My question is, how do I differentiate between which button is pressed on the users table?</p>
  
  <p>this is what my table looks like: </p>
  
  <p><a href="https://i.stack.imgur.com/ED61a.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ED61a.jpg" alt="enter image description here"></a></p>
  
  <p>And this is the code for generating the table and buttons. </p>
  
  <pre class="lang-js prettyprint-override"><code>if (!$_REQUEST['search']) {
  
    $sql = "SELECT * FROM users_table ORDER BY lname ASC";
  
    $retvalues = mysqli_query($conn, $sql);
  
    $counter = 1;
  
    while ($row = mysqli_fetch_array($retvalues, MYSQL_ASSOC)) {
  
      $lname = capword($row['lname']);
      $fname = capword($row['fname']);
  
      if ($row['admin'] != 1) {
        $stringAdmin = "No";
        $admincolor = "&lt;td&gt;";
  
      } else {
        $stringAdmin = "Yes";
        $admincolor = "&lt;td style='color:red;'&gt;";
      }
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;".$counter.".&lt;/td&gt;";
      echo "&lt;td&gt;".$lname." , ".$fname."&lt;/td&gt;";
      echo "&lt;td&gt;".$row['email']."&lt;/td&gt;";
      echo "&lt;td&gt;".$row['password']."&lt;/td&gt;";
      echo $admincolor.$stringAdmin."&lt;/td&gt;";
      echo "&lt;td&gt;&lt;input type='checkbox' name='user[]' value='{$row['id']}'&gt;&lt;/td&gt;";
      echo "&lt;td&gt;&lt;input type='submit' name='edit' value='edit'&gt;&lt;/td&gt;";
      echo "&lt;/tr&gt;";
  
      $counter++;
    }
  }
  </code></pre>