I have a PHP chat system with a notification option (where users can see how and who sent them messages). Now I want if a user/receiver click on a user profile (in chat page) on the sidebar and there is a sort of messages unread, after clicking messages status must be changed to read (by the default message status=‘0’, and have to change to status=1’).
<a href="inbox?msgid=<?php echo $id;?>" type="button" onclick="msgRead()" style="width:100%">
<div class="row con_cont_list">
<div class="col-3">
<img src="media/<?php echo $ProfileImg;?>" width="60px" height="60px" alt="">
</div>
<div class="col-9">
<p><?php echo $FullName;?>
<?php if($frnd_msgs_noti):?>
<span class="badge badge-danger" style="border-radius:50%;"><?php echo $frnd_msgs_noti;?></span>
<?php endif;?>
</p>
</div>
</div>
</a>
