title: Multiple echoed delete-edit buttons in PHP event listener
body: <p>I am trying a trivial PHP assignement. I am running my own SQL server locally and I have created a DB on it called <code>student</code>. This database contains many tables. One of them is called <code>announcement</code>. The fields of this table are <code>id, date, subject, text</code>.</p>
  
  <p>I am asked to display those announcements to a user that has the authority to delete and/or modify those entries of the DB. Each entry needs to be seperated from the next one and each entry has to have it's own <code>Delete</code> and <code>Edit</code> button. New entries can also be added to the database so the # of entries currently on the DB is not known.</p>
  
  <p>So far I have done something like this:</p>
  
  <pre><code>&lt;?php
      $db = mysql_connect("localhost", "root", "");
      mysql_select_db("student",$db);
      mysql_set_charset('utf8',$db);
      $result = mysql_query("SELECT * FROM announcement",$db);
      $announcementID = 1;
      WHILE($myrow = mysql_fetch_array($result))
      {
          echo "&lt;br&gt;&lt;h2&gt;Announcement No".$announcementID."&lt;/h2&gt;";
          echo "&lt;input type=\"submit\" name=\"Delete\" value=\"Delete\"&gt;&lt;input type=\"submit\" name=\"Edit\" value=\"Edit\"&gt;&lt;br&gt;";
          echo "&lt;br&gt;Date: ".$myrow["date"];
          echo "&lt;br&gt;Subject: ".$myrow["subject"];
          echo "&lt;br&gt;Text: ".$myrow["text"];
          $announcementID=$announcementID+1;
          echo '&lt;br&gt;&lt;hr /&gt;';
      }
   ?&gt;
  </code></pre>
  
  <p>This is a part of a larger php file that displays a webpage with the entries properly formatted. </p>
  
  <p>Although I do create the separate buttons needed for each distinct announcement I do not think this can work out since I can't create an <code>ActionListener</code> (forgive me but I do not know how this is called in PHP) for those buttons and I am not even sure it is possible considering that all of those buttons will have the same name. Any workaround?</p>