Welcome Guest, Not a member yet? Register   Sign In
How can i active inserted wisthlist icon ? Please help me
#1

Please help me Dev Brothers,
I want to active wishilist icon if you user add item in wishlist. I have already one query there , i am looping again then show many result , i want show only same id then active show wishlist icon. Please help me.



<?php

                $id = $this->session->userdata('id');

                      $this->db->select("*");
                      $this->db->where('id', $id);
                      $this->db->from('wishlist');
                      $query = $this->db->get();
                      $single_data=$query->row();



              ?>



                <?php

                  if ($allProduct ) {
                    foreach ($allProduct as $value) {


                ?>
            <!-- Start Col -->
            <div class="col-lg-4 col-md-6 mb-4">
              <div class="card snippet-item text-center">
   
                <div class="card-footer">

                       <h1><?php echo $value->title; ?></h1>
                      <?php echo $value->img; ?>
                        <?php echo $value->content; ?>
                  <div class="snippets-preview-icon">
                    <ul>

                      
                      <?php if ($this->session->userdata('id') == TRUE) {?>
                      <li>

                          <form class="fav-snippet" action="<?php echo base_url(); ?>wishlist/<?php echo $value->id; ?>" method="post">

                            <input type="hidden" id="id" name="id" value="<?php echo $this->session->userdata('id'); ?>">
                          <button class="b-favorite" type="submit">

                            <?php if ($single_data->id == $value->id) {

                              ?>


                        <i  style="color:#dc3545 !important" class="mr-1 icofont-ui-love"></i>

                      <?php } else{?>

<i  class="mr-1 icofont-ui-love"></i>
<?php } ?>


                          000</button>


                          </form>



                      </li>

                    <?php }else{ ?>
                      <li><a class="b-favorite" data-toggle="modal" data-target="#login"><i class="icofont-ui-love"></i>25</a></li>
                    <?php } ?>
                    </ul>

                  </div>
                </div>
              </div>
            </div>
            <!-- End Col -->
            <?php }?>


          </div>
          <!-- End Row -->
Reply


Messages In This Thread
How can i active inserted wisthlist icon ? Please help me - by nababurbd - 02-22-2020, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB