0

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.

rene
  • 41,474
  • 78
  • 114
  • 152
Spencer
  • 21,348
  • 34
  • 85
  • 121

3 Answers3

6

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.

Jonathan Wood
  • 65,341
  • 71
  • 269
  • 466
0

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

Mironor
  • 1,157
  • 10
  • 25
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.

haha
  • 1,522
  • 2
  • 15
  • 18