2 database tables:
table 1: Team members -
member_id
name
table 2: Comments -
comment_id
member_id
comment_on_id
comment
When someone logs in you pull all the team members out who aren't that teammember and create a form on the fly like this:
while ($record = mysql_fetch_object($result)) {
echo "<textarea name=\"c_".$record->member_id."\"></textarea>";
}
when the form is submitted $_POST will have a bunch of variables in called things like c_2, c_3, c_6 and so on. These are the comments on the team members corresponding to each id.
To store the comments pull out the same recordset used to generate the form, that is the teammembers that aren't the current user, and use a reference to put them into the database:
while ($record = mysql_fetch_object($result)){
$commentVar = "c_".$record->member_id;
$sql = "insert into comments (member_id, comment_on_id, comment) values (";
$sql .= "'".$_SESSION['logged_in_id']."', ";
$sql .= "'".$record->member_id."', ";
$sql .= "'".$$commentVar."') ";
So if I'm user 1 and I'm logged in, the code will loop through the other users 2, 3, 4 and 5, and store my id, the member id of each other person, and the variable c_2, c_3, c_4 and c_5 in 4 seperate records in the comments table.
That should get you started..