if ($array[$k] > $_POST['result_minimum_' . $i]) {
                                     $result_max = $array[$k] - 1;
                                 }
                             }
                         }
                     }
                 } else {
                     // if in simple mode, just default by 0
                     $result_min = 0;
                     $result_max = 0;
                 }
                 $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->updateResultTest($result_title, $result_description, $result_picture, $_POST['ur' . $i], $result_max, $result_min, $member->id);
                 } else {
                     $quiz->addResultTest($result_title, $result_description, $result_picture, $result_max, $result_min, $member->id);
                 }
             }
         }
         // end for loop
     }
     // check the direction to go
     if ($_POST['save'] == "Previous Step") {
         header("Location: ../webroot/createQuiz.php?step=1&id=" . $quiz_id);
     } else {
         header("Location: ../webroot/createQuiz.php?step=3&id=" . $quiz_id);
     }
     break;
 case 3: