passing id to model class popup in bootstrap in codeigniter

Solutions on MaxInterview for passing id to model class popup in bootstrap in codeigniter by the best coders in the world

showing results for - "passing id to model class popup in bootstrap in codeigniter"
Titouan
10 Sep 2017
1 <div class="modal-header"><h3 id="addNewLabel"><?php echo empty($cat->category_id) ? 'Add category' : 'Edit category ' . $cat->category; ?></h3></div><!-- end of .modal-header -->
2<div class="modal-body">
3<?php echo form_open('admin/category/manage') . PHP_EOL; ?>
4    <p>
5    <label for="category_name">Category name:</label>
6<input type="text" name="category_name" value="<?php echo set_value('category_name', $cat->category); ?>" />
7    </p>
8    <p>
9    <label for="parent">Set Parent category:</label>
10    <select>
11    <option>-- None --</option>
12    <?php if(count($all_categories)): foreach($all_categories as $cat): ?>
13    <option value="<?php echo $cat->category_id; ?>"><?php echo $cat->category; ?></option>
14    <?php endforeach; endif; ?>
15    </select>
16    </p>
17    <?php echo form_close() . PHP_EOL; ?>
18</div>
19<div class="modal-footer">
20    <button class="btn btn-primary" type="submit">Add</button>
21    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
22</div>
23