Hi, I'm trying to make a forum in which registered users can write comments and assess, the problem is that a registered user can rate as many times as they want and I would like the user to rate 1 time per comment.
The page is link
The code is the following:
<script>
function like(id) {
if (id.length == 0) {
return;
} else {
window.location.href = "like.php?id="+id;
}
}
function dislike(id) {
if (id.length == 0) {
return;
} else {
window.location.href = "dislike.php?id="+id;
}
}
function deletecom(id)
{
if (id.length == 0)
{
return;
} else
{
alertify.confirm('Eliminar este comentario','¿Estas seguro que quieres eliminar este comentario?',
function(){
window.location.href = "deletecom.php?id="+id;
},
function(){
alertify.error('Cancel');
});
}
}
function añadir(){
alertify.success('Ok');
}
</script>