Question

I want to create a Feedback form for my website with rating system, which will then display the monthly average rating to a separate page as a graph.

I do have a little concept. But It's lacking something. I know how to create a feedback form. But I am confused on how to save it in Mysql. I mean do I need to calculate the average rating before saving it to mysql or when calling from the graphs page.

Please help me with concept or example.

Thanks.

Was it helpful?

Solution

You will have a form, where the user will put all the rating and the info.

When the user press the "Send" button you will execute a PHP code, this script will take the value of the form, and insert them inside a database, with the current year / month.

When you will go on the page that will show the rating you will execute a php code that will take all the rating in the current year/month from the database , sum them, and do the average calculation. Then you will show the value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top