how to like/unlike with button using toggleclass
问题 this is my like button... HTML code <div class="btn"> <div class="boxcoracao"> <span class="coracao" id = "<?php echo $postid?>" name = "like">br> Love</span> </div> </div> Jquery inside HTML <script> $(".btn ").click(function(){ $('.boxcoracao .coracao', this).toggleClass("ativo"); }); </script> it works when i click and unclick the button the button changes but what my problem is how can i use this function to save data to my database. sample when 1st click the button it will like..