Does anyone knows any free php softwares to generate any report on a website or site that stores data on MYSQL database.

Or Is there any such code to do a summary report of the results stored on the mysql database. For example, if I have a survey form and users has filled the survey online and submit it, it is stored into the database. So, how can I write a simple php code to generate report about the results as well as a software to check the percentage functionality of the php codes in general..if it is well coded or bad.

Can anyone help me please.