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

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

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

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

<h2><?= $category->Category ?></h2>
<p>Are you sure?</p>

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

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

<button style="background-color: red;">Yes</button>

<a class="button" href="<?= site_url('/categories') ?>">No</a>

</form>

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

