View file File name : best_deals.php Content :<div class="container-fluid"> <div class="col-md-12 content-center"> <div class="card-plain"> <form class="form" method="post" action="<?=base_url()?>Properties/add_bestdeal" enctype="multipart/form-data"> <div class="header"> <div class="logo-container"> <img src="assets/images/logo.svg" alt=""> </div> <h5 CLASS="text-center"> ADD BEST DEALS</h5> </div> <div class="content row"> <div class="form-group col-md-3"> <div> Select Properties</div> <select class="js-example-basic-multiple form-control" name="properties[]" required multiple="multiple" placeholder="Nearby"> <?php foreach($properties as $n){ ?> <option value="<?=$n->id?>"><?=$n->project_code?></option> <?php } ?> </select> </div> <input type="hidden" name="updated_by" value="<?=$_SESSION['users']->id?>" placeholder="updated_by" class="form-control" /> </div> </div> <div class="footer text-center"> <button type="submit" class="btn l-cyan btn-round btn-lg btn-block waves-effect waves-light">Submit</button> </div> </form> </div> </div> </div> <script> // $(document).ready(function() { $('.js-example-basic-multiple').select2(); // }); </script>