how to retain values in dropdown using codeigniter -


<select id="store_owner"  class="form-control" name="store_owner">     <option>--select--</option>     <?php foreach ($admin_email $admindata):?>          <option value="<?php echo $admindata['service_provider_email_id']?>"><?php echo $admindata['service_provider_email_id']?></option>      <?php endforeach;?>    </select> <?php if (form_error('store_owner')) { ?><span style="color: #e68f8f;"><?php echo form_error('store_owner'); ?></span> <?php } ?> <?php endif;?>     

the value should retain if form partially validated.how retain values of select field. please check code.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -