teamid == $team->id) { $query_user_table = sprintf( "update user set teamid = %d where id = %d", 0, $user->id ); $result_user_table = mysql_query($query_user_table); $nusers = $team->nusers; $new_nusers = $nusers - 1; $query_team_table = sprintf( "update team set nusers = %d where id = %d", $new_nusers, $team->id ); $result_team_table = mysql_query($query_team_table); if ($result_user_table && $result_team_table) { $team_name = $team->name; page_head("Quit $team_name"); echo "