Method for keeping track of “up” and “down” votes

JT

New Member
I have a website that picks an entry from a database at random and then displays it to the user. I would like to add a "top rated" page on which the best entries as chosen by an aggregate of user opinions are displayed. I want up votes and down votes as seen here on stackoverflow and on many other websites. I am not very experienced with web development, so I'm at a loss about where to start. The idea I have is that clicking "up" will add 1 to the "votes" field in a table and clicking "down" will subtract one from the same field, and I'll tie it all together with an "id" field that references on which entry is being voted. Is there a more elegant solution? How do I get started?edit: my server side scripting is in PHP and I'm familiar with jquery. edit 2: Upon rereading, I realize how broad this question is. Sorry! Specifically, I want to know how to code the PHP and mySQL necessary to add and subtract votes to and from the "votes" table without refreshing the page.
 
Back
Top