I have a php function like this
function printSelectedMembers($id) {
$full_name = $this->getUserName($id);
echo '<dl>';
echo '<dt><label for="event_show">Selected member :</label></dt>';
echo '<input type="checkbox" name="pvtContacts[]" checked="checked" value="'.$id.'"/>'.$full_name;
echo '</dl>';
}
In this I want to delete the entry if the member is already in the checkbox array ( pvtContacts[] ). How will I check the contents of the array before submitting the form ?
as in comments you cannot check fields with php, as they are checked after the form is submitted, but you can use javascript to check if checkboxes are checked.
you can modify the function to alter/delete some parts …