Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Before displaying the module, you execute an SQL query in which two actions are performed:
1. Counting the number of likes from all users
2. Determine whether the user liked it or not... (it depends on how the likes button will look)
2.1. If the user likes it, then we change the picture itself and when you click on it, another SQL query will be executed that will remove the like !!!
2.2. If the user did not like it, then we display the full number of likes and assign another SQL query that will add one more like...
Yes, in my opinion, that's all you need... If there are difficulties , write , I'll help...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question