title: how can i get an ID of a button in php without knowing the ID name upfront
body: <p>I'm trying to make a ban account system using PHP. Firstly I have a search function where I put in some characters, when i click on search it shows all account names containing these characters. I don't know upfront how many account names will be displayed. Behind every account name i have a button with the attribute name = "BAN" and an attribute ID; which is variable (it shows the account name id that is given in the SQL database). So what i want to do now is ban an account using the id that i gave to the button. is there any way i can get the id value into a PHP variable without know upfront what button is clicked?</p>
  
  <p>this is my html/PHP: </p>
  
  <pre><code>                while($searchedaccounts = mysql_fetch_assoc($searched)) {
                  $id = $searchedaccounts["user_id"];
                  $username = $searchedaccounts["username"];
                  $email = $searchedaccounts["email"];
                  echo "&lt;tr&gt;";
                  echo "&lt;td data-th = 'User ID' &gt;";
                      echo $id;
                  echo "&lt;/td&gt;";
                  echo "&lt;td data-th='Username'&gt;";
                      echo $username;
                  echo "&lt;/td&gt;";
                  echo "&lt;td data-th='Email'&gt;";
                      echo $email;
                  echo "&lt;/td&gt;";
                  echo "&lt;td data-th='Email'&gt;";
                  echo "&lt;button type='submit' name='ban' id='ban$id'&gt;Ban&lt;/button&gt;";
                  echo "&lt;/td&gt;";
                  echo "&lt;/tr&gt;";
              }
  </code></pre>