public function delete_id($id,$type) { if ($type=="facebook") { $this->del = $this->pdo->exec("DELETE FROM `facebook` WHERE `id` = '{$id}'"); } else if ($type=="tv") { $this->del = $this->pdo->exec("DELETE FROM tv_paczka` WHERE `id` = '{$id}'"); } else if ($type=="galeria") { $this->del = $this->pdo->exec("DELETE FROM `gallery` WHERE `id` = '{$id}'"); } if ($this->del) { } }