I am creating a page in which user can upload their picture and other users can like it.
Now is there any method that when the user's like goes above 50 lets say 51, then execute a query that saves this users name and postid. And then show a notification to user that your post have crossed 50 likes.
Also i dont want the query to execute again and again i want it to send that query only once for that particular post i am using php any suggestions
this is the code that i used but didnt work:
<?php if ($vote>=50){
mysqli_query($con, "insert into notifications (user_id,post_id) values('$id3','$pixid')")or die(mysqli_error($con));
}
?>