<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>

<h4>Edit Customer</h4>
<form action="<?= base_url('admin/customer/update/' . $customer['id']) ?>" method="post">
    <div class="mb-3">
        <label>Nama</label>
        <input type="text" name="nama" value="<?= esc($customer['nama']) ?>" class="form-control" required>
    </div>
    <div class="mb-3">
        <label>Telepon</label>
        <input type="text" name="telepon" value="<?= esc($customer['telepon']) ?>" class="form-control">
    </div>
    <div class="mb-3">
        <label>Email</label>
        <input type="email" name="email" value="<?= esc($customer['email']) ?>" class="form-control">
    </div>
    <div class="mb-3">
        <label>Alamat</label>
        <textarea name="alamat" class="form-control"><?= esc($customer['alamat']) ?></textarea>
    </div>
    <button type="submit" class="btn btn-primary">Update</button>
    <a href="<?= base_url('admin/customer') ?>" class="btn btn-secondary">Kembali</a>
</form>

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

