ColumnOne ColumnTwo ColumnThree Columnfour Columnfive ColumnSix one two three four 0 \'Button Here\'
As you can se
Well, you will need to one or two things (depends...). You will probably have to name the submit button:
Than in PHP, you can do this IF:
if (isset($_POST["delete]") {
mysql_query("DELETE FROM ...");
}
But, if you will have more records in the table, you will also have to add input with record ID. This is little bit more complicated, because the form is covering whole table and you dont know what ID input to chose. One of possible solutions is naming the input button by id of the record, for example:
Than in PHP you could do this:
foreach ($_POST as $name => $value) {
if (preg_match("/^delete_[0-9]+$/", $name)) {
$idArray = explode("_", $name);
$id = addSlashes($idArray[1]);
mysql_query("DELETE FROM ... WHERE id = '" . $id . "'");
}
}