function batchDelete($p, $ids) { $c = new Sale($this->db_conn); $i = 0; for ($i = 0; $i < count($ids); $i++) { $c->getData($ids[$i]); $c->delete(); } $this->gotoURL("sale.php?action=list"); //$this->browse($p); }