prøv dette
<script type="text/javascript">
function process(LikeId) {
//your validation code
$.ajax( {
type: 'POST',
url: LikeUnlike.php, //file where like unlike status change in database
data:{like:LikeId},
success: function(data) {
//code you want to do after successfull process
}
} );
}
</script>
foretage ændringer i html
<a href='Javascript:void(0)' onclick='process(1)'>Like</a>
<a href='Javascript:void(0)' onclick='process(0)'>Unlike</a>