<?php $section = $sections['section_4'] ?? []; ?>

<form method="post" action="<?php echo site_url('admin/product/save_section'); ?>" enctype="multipart/form-data">
    <input type="hidden" name="prd_id" value="<?php echo $product['prd_id']; ?>">
    <input type="hidden" name="section_key" value="section_4">


    <div class="form-group"><label>Title</label><input name="title" class="form-control" value="<?php echo $section['title'] ?? ''; ?>"></div>
    <div class="form-group"><label>Bullet Points</label><textarea name="points" rows="4" class="form-control"><?php echo isset($section['points']) ? implode("
", $section['points']) : ''; ?></textarea><small>Enter each line as a bullet</small></div>
    <div class="form-group"><label>Image</label><input type="file" name="image" class="form-control"><?php if (!empty($section['image'])): ?><img src="<?php echo base_url($section['image']); ?>" style="width:150px; margin-top:10px;"><?php endif; ?></div>
    <button class="btn btn-success">Save</button>
</form>