title: Delete individual rows from database with PHP and MySQL
body: <p>I get the values in the table from the database by <code>SELECT FROM...</code>(MySQL). This works fine, but now i want to have a delete button in each row that deletes this row from database. The problem is that the create dates all have the same name attribute </p>
  
  <pre><code>&lt;?php  $createDate = $_REQUEST['createDate'] ;
  </code></pre>
  
  <p>function deleteQuantityPlan($createDate) {</p>
  
  <pre><code>createConnection();
  
  $delete_quantity_plan = "DELETE FROM andon_quantity_plan where erstelldatum = '". $createdate ."'";
  
  $result = mysql_query($delete_quantity_plan) or die ("error");
  
  return;   }?&gt;
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form action="shiftenter.php" method="post"&gt;
                  &lt;div class="col-lg-2" style="background-color:#E1E1E1;width:65%;border-radius:10px;float:left;margin-left:17.5%;margin-right:17.5%;margin-top:2.5%"&gt;
                    &lt;h3&gt;Taktvorgabe hinzuf&amp;uuml;gen!&lt;/h3&gt;
                      &lt;div style="height:5px;"&gt;&lt;/div&gt;
                              &lt;table style="font-size:12px;" id="tabelle" class="table"&gt;
                                  &lt;thead&gt;
                                    &lt;tr&gt;
                                      &lt;th&gt;Erstelldatum&lt;/th&gt;
                                      &lt;th&gt;G&amp;uuml;ltig von&lt;/th&gt;
                                      &lt;th&gt;G&amp;uuml;ltig bis&lt;/th&gt;
                                      &lt;th&gt;Schichtnummer&lt;/th&gt;
                                      &lt;th&gt;St&amp;uuml;ck/min&lt;/th&gt;
                                      &lt;th style='float:right'&gt;Taktvorgabe l&amp;ouml;schen&lt;/th&gt;
                                    &lt;/tr&gt;
                                  &lt;/thead&gt;
                              &lt;tbody id="table1Body"&gt;
  
                                  &lt;?php
                                  $takttdaten = getAllQuantityPlans();
  
                                  for ($i = 0; $i &lt; sizeof($takttdaten); $i++) {
                                      echo "&lt;tr&gt;";
                                      echo "&lt;form action='shiftenter.php' method='post'&gt;&lt;td name='datum'&gt;" . $takttdaten[$i]-&gt;erstelldatum . "&lt;/td&gt;";
                                      echo "&lt;td&gt;" . $takttdaten[$i]-&gt;validfrom . "&lt;/td&gt;";
                                      echo "&lt;td&gt;" . $takttdaten[$i]-&gt;validuntil . "&lt;/td&gt;";
                                      echo "&lt;td&gt;" . $takttdaten[$i]-&gt;shiftnumber . "&lt;/td&gt;";
                                      echo "&lt;td&gt;" . $takttdaten[$i]-&gt;planquantity . "&lt;/td&gt;";
                                      echo "&lt;td&gt;&lt;button style='float:right;' class='btn btn-danger' type='submit'&gt;X&lt;/button&gt;&lt;/td&gt;&lt;/form&gt;";
                                      echo "&lt;/tr&gt;";
                                  }
                                  ?&gt;
                           &lt;/tbody&gt;
                       &lt;/table&gt;
                  &lt;/div&gt;
              &lt;button type="submit" style="width:15%;margin-top:35px;" class="btn btn-info"&gt;
                  &lt;span style="float: left;" class="glyphicon glyphicon-floppy-disk"&gt;&lt;/span&gt;Taktvorgabe speichern!&lt;/button&gt;
          &lt;/form&gt;
  </code></pre>