Quote:
Originally Posted by harleyparts
OK i made this form but i want it to calculate the answers and rate them
its all in fun and not important , but by golly i want it
I have added the form so those who know something can look it over.
works fine except for the vbif and or but stuff
its a test and its basically 1 of 2 choice's but i want to average the score and based on that score i want it to rate the test
so score of 20 7 or highest and the score of 20 1 or lowest answers is lowest
and maybe a middle then i would like it to say in the final results the score that was calculated
any help would be really appreciated ..rofl
|
Form Hook: Before Submit:
PHP Code:
$disabled_updateuserids = true;
$closed=true;
$count = 0;
foreach ($q AS $a => $b)
{
if ($a && is_numeric($b) && $b > 0)
{
$average += $b;
$count++;
}
}
if ($count != 0)
{
$q['average'] = $average/$count;
if ($q['average']>5)
{
$formoutput = "you are hillbilly average 5+";
}
else
{
$formoutput = "you are not hillbilly average 5-";
}
}