예제 #1
0
function doDelete()
{
    @($id = $_POST['selector']);
    $key = count($id);
    //multi delete using checkbox as a selector
    for ($i = 0; $i < $key; $i++) {
        $bureau = new bureau();
        $bureau->delete($id[$i]);
        $details = new bureau_details();
        $details->delete($id[$i]);
        $sy = new Schoolyr();
        $sy->delete($id[$i]);
        $req = new Requirements();
        $req->delete($id[$i]);
    }
    message("bureau has successfully deleted!", "info");
    redirect('index.php');
}