Could be many reasons.
1. php short tags may be disabled. Use <?php
2. Register globals may be disabled. Use $_POST['form_element'] instead of $form_element.
This is an example.
<?php
if(isset($_POST['submit'])) {
foreach($_POST['checkbox'] as $checked) {
//delete checked record
}
}
?>
<html>
<body>
<form method='post'>
<input type='checkbox' name='checkbox[]' value='1' /> 1
<input type='checkbox' name='checkbox[]' value='2' /> 2
<input type='checkbox' name='checkbox[]' value='3' /> 3
<input type='checkbox' name='checkbox[]' value='4' /> 4
<input type='submit' name='submit' value='submit' />
</form>
</body>
</html> Welcome to Daniweb BTW. Please read the guidelines on how to use [ code ] tags for better readability of your code.
nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356