0

i am building a notification system for my project,i am more of a php developer what i want to accomplish is that when a user clicks on a notification link eg [3] means there are 3 unread notifications,what i want is that when a user clicks and see these notifications to update my notification table and set seen field to 1 so as a notification link will be [0] and i know this can be achieved through ajax request or any other method if anyone can help will appreciate a lot coz m finalizing my project and run out of time :-) here z my code

          <?php if (isset($this->session->userdata['messagecount'])): ?>
              <?php if (empty($this->session->userdata['messagecount'])){echo "<button class='btn'></button>";}else{

                  $count=$this->session->userdata['messagecount'];

     echo "<button class='btn btn-info dropdown-toggle notify-btn' data-toggle='dropdown' onclick='updateNotifications()'href='#'>".$count."</button>"; 
                  }?>


     <?php endif; ?>

        <ul class="dropdown-menu">
         <div class="notify-wrapper">
          <div class="scroll">
            <div class="scroll-body">
               <ul class="notification-list">
            <?php if (isset($this->session->userdata['notification'])): ?>
              <?php if (empty($this->session->userdata['notification'])){echo "No Notifications";}else{

                  $notification=$this->session->userdata['notification'];

                  echo $notification; 
                  }?>


     <?php endif; ?>
            </ul>
            </div>
            </div>
            </div>
        </ul>


   <?php }else{?>



   <?php }?>
 </li>

1 Answer 1

0

Read documentation, it is well described there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.