if ($row_resultMode['display_mode'] == "test_custom") { $mode = "test_custom"; } } while ($row_resultMode = mysql_fetch_assoc($resultMode)); //***********************************************END OF ADD BY LIEN************************************************// // save the results from step 2 $quiz = new Quiz($quiz_id); // Quiz Results if ($mode == "simple" || $mode == "accurate") { for ($i = 0; $i < $_POST['resultCount']; $i++) { if (isset($_POST['result_title_' . $i]) && isset($_POST['result_description_' . $i]) && isset($_POST['result_picture_' . $i])) { $result_title = $_POST['result_title_' . $i]; $result_description = $_POST['result_description_' . $i]; $result_picture = $_POST['result_picture_' . $i] != "" ? $_POST['result_picture_' . $i] : "none.gif"; if (isset($_POST['ur' . $i])) { $quiz->updateResultMulti($result_title, $result_description, $result_picture, $_POST['ur' . $i], $member->id); } else { $quiz->addResultMulti($result_title, $result_description, $result_picture, $member->id); } } } } else { //Modified by Hien on 13 Oct for storing range of results //create an array for storing range if ($mode == "test_custom") { $array = array(); for ($i = 0; $i < $_POST['resultCount']; $i++) { if ($_POST['result_minimum_' . $i] != "select") { $array[$i] = $_POST['result_minimum_' . $i]; } }