Log in

View Full Version : Rating system



Jay Dog
02-28-2013, 12:07 PM
Hiya,

I have been asked to produce a system where staff members can rate a resource out of 5 using stars similar to Amazon.

I have found a few examples on line and have tried them but with little result.

I know I may sound 'stupid' here but I have been using the Moo Tools one as a template

http://www.eccemedia.com/blog/blog.e/mootools-simple-star-rating-script

And I can get the stars to work but how does it store the rating and then display and average of the ratings?

I'll be prefectly honest with you from what I have seen on-line it does seem a bit beyond my knowledge and if there is a code sample out there that does the trick then I'd love to know about it.

Many thanks,


Jasy Dog

Beverleyh
02-28-2013, 02:37 PM
Typically, the data would be stored in a database - MySQL or sometime flat-files (text files)

You'll find lots of pre-made rating scripts here: http://www.hotscripts.com/search/php/rating+system - skip over the "sponsored" stuff and the goodies start 6 or 7 items down. Just work through, test the demos and select something you like the look of. Some are free and some are commercial so you should find one that's suitable.

Jay Dog
03-04-2013, 04:23 PM
Hi Thanks, I'm looking at this one here:


http://www.hscripts.com/scripts/php/starrating.php

These are the instructions:

a) Unzip the folder "five-star-rating.zip" .
b) Create a database for Five star rating Scriptand name it, for example, as "star".
c) Change the configuration file(config.php) to match with your database.
d) Run the file "tables.php" in your browser.
e) You will get the message, "Your tables are created succezzfully.........."
f) Run the file "code.php".
g) The code will be generated and this can be placed wherever you wish the five star rating to appear.


a) is simples, just done that but hate to sound like a complete dumbo but the bit on b) create a database... has got me lost, how do I do that and in what package?

Beverleyh
03-04-2013, 04:49 PM
That will be via your web hosts control panel, so go there, login in to your customer account, and look for something in the menu under a "database" heading - possibly something called "database manager" or "mySQL manager" (most likely sat alongside something called "phpMyAdmin"), although if you can't easily find it, its best to check with your host.