title: Adding a delete button in PHP on each row of a MySQL table
body: <p>I am trying to add a delete button on each row so that I can delete a record when the button is pressed. I am new to PHP and MySQL and Stack Overflow.</p>
  
  <p>Below is my table which extract information from my MySQL database and that works.</p>
  
  <pre><code>       &lt;table class="table" &gt;
         &lt;tr&gt;
         &lt;th&gt; Staff ID &lt;/th&gt;
         &lt;th&gt; Staff Name &lt;/th&gt;
         &lt;th&gt; Class &lt;/th&gt;
         &lt;th&gt; Action &lt;/th&gt;
  
         &lt;/tr&gt;   
  
         &lt;?php
  
         while($book = mysqli_fetch_assoc($records)){
  
         echo "&lt;tr&gt;";
         echo "&lt;td&gt;".$book['Staff_ID']."&lt;/td&gt;";
         echo "&lt;td&gt;".$book['Staff_Name']."&lt;/td&gt;";
         echo "&lt;td&gt;".$book['Class']."&lt;/td&gt;";
         echo "&lt;/tr&gt;";
         }// end while loop
  </code></pre>