I have all data from a database table display as an HTML table on a page. When an admin selects a row, it adds a class of 'remove' to the parent row in the HTML table.
I then want to delete it from the mysqli database. Would I set the row fields as variables and delete the row that matches it in the database? I'm not sure how to do it, could someone please point me in the right direction?
HTML
<table>
<tr class="remove">
<td>field1</td>
<td>field2</td>
<td>field3</td>
</tr>
<tr>
<td>another field</td>
<td>another field</td>
<td>another field</td>
</tr>
</table>
Mysqli (relevant sample)
$mysqli->query("DELETE FROM $table WHERE Date="??" LIMIT 1");