Create an evaluation format in PHP (Ratings) Dynamic [closed]

0

Personally, I'm creating a music portal and would like to create a script just like the photo above in PHP. My goal is to analyze CD's released and post notes referring to the characteristics of the CD I will analyze.

I have no idea how to do the same, thanks any help. Thanks

    
asked by anonymous 11.07.2014 / 20:58

1 answer

0

In your database you must create 2 fields, one to store the amount of votes and another to accumulate the amount of points.

Since the maximum value of the note is 5, then in the following situation:

200 votes the maximum score will be 1000; 201 votes will be 1005 and so on;

Ex:

  

CD 1 - received 2 votes

     

Vote 1 = 5.0

     

Vote 2 = 4.2

     

Final Note 4.6

     

CD 2 - received 3 votes

     

Vote 1 = 5.0

     

Vote 2 = 4.2

     

Vote 3 = 1.5

     

Final note 3.5

To do the calculations

  

Final Score: Total Score / Number of votes

The insertion of the points must have a conditional, the values must be between 0 and 5.

With this logic I believe you will be able to develop the steps.

If you would like a script ready and want to adapt to your system click here >, but it would be interesting to try to do it yourself.

    
11.07.2014 / 21:21