Hello, I'm working on this app for users who can upload images, and users to vote on them.
I've done the part about creating content and showing it, now I'm at the stage to build the voting system.
Request:
Post has 2 buttons: Black vote & White vote
Press button:
• +1 added in db
• one time per user
• one button or the other, not both
• user can unvote
Post can be either in Black div or White div, but not both.
The div is determined by Black votes and White votes:
if Black votes > White votes
div = Black ;
else White
Obviously I'm not asking the code for this, but can you guide me with the steps, what to use to get there?
thanks!