I think this would work then:
<input name="book[]" type="checkbox" class="form-check-input" <?php echo(in_array($booksList->getColumnVal("BookID"),isset($_GET["book"])?$_GET["book"]:array())?"checked":""); ?> value="<?php echo($booksList->getColumnVal("BookID")); ?>"><?php echo($booksList->getColumnVal("BookNameBD")); ?>