I was wondering something. I'm currently making a website and I have a function where you can post things on a stream and where you can like the stream.
Now I'm wondering, I have this in a .js file:
$(function(){
$('.icon-like').click(function(){
var count = parseInt($(this).html());
count++;
$(this).html(count++);
});
});
What I want is everytime I click on the like icon, the user has no access to like it again (preventing a like-spam) and the row in the database will be updated.
However, I have no clue how to link PHP with JS. I know the PHP script I just don't know how to get it working.
Thanks already for helping ;)