Sorry, just started using yii. I am making a evaluation form, when i try to save, the answer_score(where the ratings should go) and questions_id aren’t saving. but when i print_f(‘Answers’);
Array ( [course_name] => NCM100 [answer_score] => Array ( [3] => 5 [4] => 4 [7] => 3 [8] => 2 [10] => 1 ) )
i want the [3]/[5]/[7]/[8] to got the question_id field and the ratings to the answer_score field.
the $descriptions is my Questions table
foreach ($descriptions as $description)
{
echo "<br>";
echo "$description->question_body";
$form->radioButtonList($answer,'answer_score['.$description->question_id.']',
array('1'=>'','2'=>'','3'=>'','4'=>'','5'=>'',),
array( 'separator' => ''));
echo "<br>";
}
My tables are Answers: answer_id,answer_score,question_id
Questions:question_id,question_body
Any ideas?