I'm trying to develop a voting syste开发者_如何学Cm in PHP for my posts where visitors can vote them up or down and then I should be able to sort posts by highest/lowest rated.
Can anyone please recommend a good script I can use for this?
There is no "script" that will magically do this for you.
You will need to create a table in your MySQL database, which at the very least has two fields, post id, and vote count.
You will also need to create a PHP page which handles vote updates as well as returning posts in sorted order.
The following links refer you to pages with a bunch of such voting scripts. Some are free and some you have to pay for:
- Voting scripts for PHP at
hotscripts.com
- Voting scripts
for PHP at scripts.com
- Voting scripts for PHP at best-php-scripts.com
- Voting scripts for PHP at resourceindex.com
You can use this one: http://www.technabled.com/2011/02/pulse-lite-reddit-ajax-up-down-voting.html Disclosure: I am the developer.
精彩评论