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

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.


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

                      $this->db->where('id', $id);
                      $query = $this->db->get();



                  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">

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

                          <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 } ?>




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

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

          <!-- End Row -->

Theme © iAndrew 2016 - Forum software by © MyBB