Create a Dynamic PHP (Ratings) evaluation format

Asked

Viewed 1,360 times

0

inserir a descrição da imagem aqui Guys, I’m creating a music portal and would like to create a script like the one in the photo above in PHP. My goal is to analyze released Cds and post notes regarding the CD features I will analyze.

I have no idea how to do the same, so I appreciate any help. Thank you

  • too broad Either there are many possible answers or good answers would be too long for this format. Add details to reduce the set of answers or isolate a question that can be answered in a few paragraphs.

1 answer

0


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

As the maximum value of the note is 5, so 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 make the calculations

Final note: Total score / Number of votes

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

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

If you want a script ready and want to adapt to your system click here, but it would be interesting to even try to do for own learning.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.