I hope you've got the picture... "y" values are positive responses, and "n" negative ones (surprisingly). I would like to count "y"'s for questions e.g. #1,#5,#6,#9,#15, and to add value "1" for every "y" found on those variables. Then I would like to create new variable, let's call it $var, which would have value 5 if respondent answered "yes" to all five questions.for($i = 1; $i <= 200; $i++) {
$row = mysql_fetch_array($result);
extract($row);
echo $item;
echo "<input type = 'radio' name = 'rsp$i' value = 'y'>yes";
echo "<input type = 'radio' name = 'rsp$i' value = 'n'>no";
echo "<br>";
}
I reckon this is trivial stuff, but, hey, I'm still official beginner...
Thanx in advance!!