Okay, I am a ltitle confused about what you are trying to do, but I will do my best to give you a hand.
First off, create a table in your database. If you need some help with the syntax check out the mysql website, or if you are running a database front end such as PHPmyAdmin it will walk you through creatinga table.
Devise the fields you will need such as an id, the id of the project the servey is about, the answers to your questions, maybe something about who took the survey (like email address, first name, favorite brand of beer, or whatever).
Now, each time someone take sthe survey, and new record will be created in the database. You can then pull the information out for all the projects, some of the projects, or one of the projects. Now to get the average answer you can do the math at the time that the number needs to be displayed. Like this:
//set some variables equal to 0 for lter calculations
$count = 0;
$q1 = 0;
$q2 = 0;
$q3 = 0;
//connect to the database
mysql_connect('server','username','password');
mysql_select_db(db_name);
//run a query as a varable to get the information out of the db
$result = mysql_query("SELECT * FROM tblSurvey WHERE project_id='n'");
//Now get all of your answers
while($row = mysql_fetch_array($result)) {
//add one to the total count
$count++;
//Tally up the answers the word in the ['']'s is the field name in the database
$q1 = $q1 + $row['q1'];
$q2 = $q2 + $row['q2'];
$q3 = $q3 + $row['q3'];
}
//Now do the math to display the average answer of all the questions
$q1_avg = $q1/$count;
$q2_avg = $q2/$count;
$q3_avg = $q3/$count;
?>
Now all you have to do is display the variables. Just to let you know this code is completly untested, and just a general idea of what I think you are trying to do. If you need some further help, or I totaly mistook what you were trying to do let me know 🙂