I am trying to create vote up and down arrows similar to what exists here on Stack Overflow. Ideally I'd like to have them interact dynamically with a piece of text recording the number of votes, just as they do on Stack Overflow.
How do you create Stack Overflow-style Up-Down arrows?
346 Views Asked by Spencer At
3
There are 3 best solutions below
0

you should look toward ajax technology in javascript to store the number of votes without page refresh.
0

Not enough with jQuery + HTML only. You need extra ingredients like PHP and MySQL to save the votes.
Example how to make voting system with jQuery, PHP & MySQL.
Unless there's some trick I hadn't considered, I'd think you'd need to create a many-to-many relationship between users and the items being voted on.
Every time someone votes up or down, you'd add a record to the joining table. This is the only way I see to track which user has already voted and be able to track both the number of up and down votes--like stackoverflow does.