the delete gallery form
<form action="" method="post" name="delete_gallery" id="delete-id">
is set to use the id delete-id
and so is the hidden element:
<input id="delete-id" type="hidden" value="<?php echo $row_gallery['gallery_id']; ?>" />
the form needs to use a unique ID name.
also search the ID's of other elements on the page and make sure only the hidden element uses the delete-id.