
<?php


if (isset($_POST['submitUpdate'])) {
    $csrf = new csrf;
    $time = new time;
    //echo $csrf->Cek();

    $created_at = $time->getTime();

    $kategori = htmlspecialchars($_POST['kategori']);
    $id = htmlspecialchars($_POST['id']);

    $dataarray = [
        'kategori' => $kategori
    ];
    $crud = new crudData();
    $update = $crud->updateData('tb_siswa_kategori', $dataarray, ['id', '=', $id]);
    $direct = new toast();
    echo  $direct->redirect('toast', 'save', 'seting/siswa/kategori/read');
} else {
    echo '';
};
