Hmmm...
Yeah, it's OK to do this by php/html, but I wouldn't advise it. Deletion of members/users is a pretty serious thing to do, don't you think? Just seem to me a bit frivolous to enable multi-delete here.
Suggestion:
Print each row as a separate form, then use an image or submit-button with onClick-statement to delete user on click. Thus you will only have to click for each user to be deleted. You should also have a regret-function, that allows for cancelling the deletion 😉
But here's the multi-delete stuff anyway:
## Form field need to be like this - same name with empty brackets, different value ##
<input type="checkbox" name="selectedArticles[]" value="<?PHP echo $id; ?>">
## Function for delete ##
function doDelete ($id, $field) {
$del = mysql_query("delete from field where id = $id");
}
## Do the loop and delete ##
for ($k = 0; $k < sizeof($selectedArticles); $k ++) {
doDelete($selectedArticles[$k]);
}
NB! Untested code - please test on test-db before trying on production site 😉
knutm