[eluser]JoostV[/eluser]
Say, the ID of an image is 23. In your form, you would add two radiobuttons as such:
Code:
<input type="radio" name="process[23]" value="delete" />
<input type="radio" name="process[23]" value="approve" checked="checked" />
Then on submit, loop through radiobuttons as such:
Code:
foreach ($_POST['process'] as $key=>$value) {
if ($value== 'delete') {
// Do something to delete image with the ID $key
} else {
// Do something to approve image with the ID $key
}
}
This code will loop through all the image radio buttons, as long as you keep naming them:
Code:
<input type="radio" name="process[<?php echo $ID; ?>]" value="delete" />
<input type="radio" name="process[<?php echo $ID; ?>]" value="approve" checked="checked" />
Of course, if the user can make a mistake in filling out the form, it is necessary to determine whether to the radiobuttons according to their $_POST value or to their default value (I chose 'approve' here)