HEY!!
I don't usualy complain unless something worth complaining happen

anyway the form should be started before the loop of the table elements!
and you don't need to have a hidden input for that !
the checkbox itself should have the value (name of image)..
and one note, I think many browser will complain (not me!) about this messed up HTML syntax !! it will work but it's really messed up ! sometimes you use single quotes sometimes you don't sometimes you use spaces and sometimes not !!
have a coding standered, it will help
You in maintaining your code !
like this:
this code shall make an array containing all images' names that will be deleted ..
so loop through the array and DELETE FROM table ..