public function gallery_delete() { $product_image_collection = new ProductImageCollection($_GET['id']); $product_image_collection->delete($_GET['id']); $galleries = $product_image_collection->get_all(); header('Location: index.php?controller=products&action=gallery&id=' . $_GET['product_id']); }