<?= $this->extend("layouts/default") ?>

<?= $this->section("title") ?>Edit Category<?= $this->endSection() ?>

<?= $this->section("content") ?>



    <?= $this->include("Categories/back") ?>

    <h1>Edit Categories</h1>
    <?php if(session()->has("errors")): ?>
        <ul>
            <?php foreach(session("errors") as $error): ?>
                <li style="color: red;"><?= $error ?></li>
            <?php endforeach; ?>
        </ul>
    <?php endif; ?>

    <?= form_open("Categories/".$category->CategoryID."/".$returnto) ?>

    <input type="hidden" name="_method" value="PATCH">

    <?= $this->include("Categories/form") ?>

    </form>

<?= $this->endSection() ?>

