<div class="container-fluid">
  <div class="row">
    <div class="col-lg-12 d-flex align-items-stretch">
      <div class="card w-100">
        <div class="card-body p-4">

          <h2 class="mb-4">Edit Help Question</h2>

          <!-- Flash message -->
          <?php if ($this->session->flashdata('success')): ?>
            <div class="alert alert-success"><?= $this->session->flashdata('success'); ?></div>
          <?php endif; ?>

          <form method="post" action="">
            <div class="mb-3">
              <label for="question" class="form-label">Question</label>
              <input type="text" class="form-control" id="question" name="question" value="<?= htmlspecialchars($details['question']) ?>" required>
            </div>

            <div class="mb-3">
              <label for="answer" class="form-label">Answer</label>
              <textarea class="form-control" id="answer" name="answer" rows="5" required><?= htmlspecialchars($details['answer']) ?></textarea>
            </div>

            <button type="submit" class="btn btn-primary">Update</button>
            <a href="<?= site_url('/admin/help') ?>" class="btn btn-secondary">Cancel</a>
          </form>

        </div>
      </div>
    </div>
  </div>
</div>
