this is just the form part of it.it checks all the boxes. is document.checkfiles.checkbox[] right? can it have the brackets in checkbox[] or the coding wrong? echo '<form name="checkfiles" action="broken_files.php" method="POST" >'; $query = mysql_query("select id, title, thumbnail, file from games") or die(mysql_error()); while($row = mysql_fetch_array($query)) { if (!file_exists('../' . $row['thumbnail'])) { echo $row['id'] . ''; echo ' <a href="manage_game.php?edit=' . $row['id'] . '">Edit</a> <input type="checkbox" name="checkbox[]" value="'.$row['id'].'"> <br />'; } } echo' <input type="submit" value="delete" /> <input type="button" name="CheckAll" value="Check All" onClick="checkAll(document.checkfiles.checkbox[])"> </form>'; PHP:
what you do is not going to work in scripting (reference to array of inputs that way) something like this? http://mooshell.net/K5Cbc/
I suggest to use jQuery javascript framework. It is lightweight and easy to use. With jQuery your problem can be solved like this: